Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Ocean of Milk
Jun 25, 2018

oh yeah
I think I may have found an actual good post on reddit:

/r/pcj posted:

quote:

It amazes me that this industry accomplishes anything at all
/uj We are all riding on the exponential growth curve that is processing power, it’s almost impossible to gently caress it up so long as you are present. It’s like if your land is increasing exponentially in value, even if you’re a loving moron who burns down their $10billion house during a gender reveal party (webshits), so long as you hang around the land value will outgrow the house price so much it’ll make the entire episode practically irrelevant.

You would never see such an orgy of inflated ego, misplaced expectations, and mental laziness if compute was growing linearly, all those people would be broke. But here, well, rising tide lifts all boats and all that.

This but it's normal capitalism insanity instead of computy boi go fast

Adbot
ADBOT LOVES YOU

Ocean of Milk
Jun 25, 2018

oh yeah
Previously, there's only been hardware space trash.

Ocean of Milk
Jun 25, 2018

oh yeah
This is too one-dimensional, what about those who build computers?

Ocean of Milk
Jun 25, 2018

oh yeah
Dehumanize yourself and face to bootstrap

Ocean of Milk
Jun 25, 2018

oh yeah
I've never done CS uni so take this with a huge grain of salt, but did a bachelor's in a natural science (geography/earth sciences) and after doing some apprenticeship thing in my country as sw developer (which is now my job), I have to say it would genuinely surprise me if university prepared you in any adequate manner for doing this job. That's not the point of universities, they do research. Isn't CS like a branch of mathematics? Professors have no clue what work in industry is like (why should they, it's irrelevant for their research and academia is a different world) and they don't care either. Most profs are primarily invested in their usually very specific research bubble.
Industry is also interested in different things than uni is. It's more useful to an employer if you understand the quite banal principles of how to wire together a working spring application and deploy it in some conainery form than it is to know what Turing proved in 1936. The best way to show that you understand this practical stuff is to show a github link as well as a deployed and running instance of the project, which is handy because creating and developing such a project is coincidentally also the best way to actually learn it.
The slip of paper you get from uni is a different form of saying "this person has been taught some basic principles about CS in a formal setting and these grades (= exam results) indicate that they didn't immediately forget it."

Ocean of Milk fucked around with this message at 23:37 on Mar 28, 2021

Ocean of Milk
Jun 25, 2018

oh yeah
First I thought maybe it's useful if you get some structured data in a string (like a path in a filesystem) and want to do something with it that is easier to handle if it's the other way around, but then I can't think of a scenario where it's necessary or a better idea to reverse the string itself instead of breaking it up into a list of tokens first and then reversing that list.

Ocean of Milk
Jun 25, 2018

oh yeah
For posterity, though I guess it's really more bad ops (or as I've recently taken to calling it, BadOps):

astral posted:

Everyone, thank you again for bearing with us during the various site maintenances of the last week or so. You might not be surprised to learn that there were some missing pieces in SA's infrastructure. Perhaps most appallingly among those, there had not been a database replica server running for several years. Further, if the site had a backup process in place before, it must have lived on that missing replica; there did not seem to be anything configured. You read that correctly—for many years, these forums were one malformed shell command, bad SQL query, or hardware failure away from vanishing in a puff of magic smoke.

Over the last week we've largely rectified this. We've taken backups, spun up three new database servers (2 live forums, 1 archives), imported all the data, set up replication (meaning changes to the main database server are sent to the replica database server), and after the cloud provider maintenance is behind us we'll work on migrating the forums from the old database servers to the new (timeline TBD). This will involve an easter egg hunt as we migrate all of radium's little cron scripts over, but thankfully Jeffrey already has a good handle on where these live. One of those new servers is already in production and handling database queries for things like displaying attachments, calculating the results for the "Who posted?" feature, as well as for various administrative tools.

With this work—and more—completed, we have the utmost confidence that we'll be able to recover from several potential worst-case scenarios, both in the upcoming downtime for cloud host maintenance and as we proceed onward into the future. Thanks for loving the forums.

Ocean of Milk
Jun 25, 2018

oh yeah
I think that might have the side effect of gaslighting people who actually have migraines into thinking they don't have it, particularly if they aren't familiar with such medical things.

Ocean of Milk
Jun 25, 2018

oh yeah

Programmers really need to stop abbreviating random words in unconventional ambigous ways. Like, leg_hands is harder to read than legend_handles anyway, just leave it the gently caress alone, goddamnit!

Ocean of Milk
Jun 25, 2018

oh yeah
First thing when I'm calling it and I know it's just gonna work when I feed it whatever because it's been written by someone much smarter than me.
Second thing when I have to actually look at the class in the IDE to understand what it does, let alone change it.

code:
// these are very probably gonna be one-line wrappers anyway
getThing(id : uuid) : Thing { .. }
getThing(otherThing : SomeOtherParamThatWillAlwaysReturnAThing) : Thing { .. }

// same, but with Optional return
tryGetThing(name : string) : Thing? { .. }
tryGetThing(otherThing : SomethingLikeNameThatMayNotFindAnything) : Thing? { .. }

 // A search may return zero, one, or multiple Things
searchThings(params : SearchParams) : ListThatCanBeEmpty<Thing> { .. }
is what I would write.

Things like getThing(directReferenceHolder: OtherThingThatHoldsIndirectReferenceToAThing) shouldn't exist, just do getThing(directReference: ActualMeaningFulReference), cause IDEs are smart enough to suggest getThing(thingWithIndirectReference.getActualMeaningfulReference()) to you.

Pseudo-edit:

quote:

code:
getThing(searchTerms: string []) : Thing? { .. } 
or
code:
tryGetThingByBestMatch(searchTerms: string []) : Thing?

I had to look at this thing in the second List to even notice what the idea was (by best match).

Ocean of Milk
Jun 25, 2018

oh yeah

xtal posted:

It's called math honey

If this is any indication, mathematicians also write at least a few lines of prose (often an entire paragraph) for every line of equations.

Ocean of Milk
Jun 25, 2018

oh yeah
Yeah there's this notion in some OOP texts/systems that methods with different parameters but the same name are somehow "the same", which is bizarre to anyone used to method overloading in statically typed systems. The term "method overloading" itself becomes weird, like why do we even have a special name for the idea that getThing(name : String) and getThing(id: Uuid) are not the same method? There's no inherent connection between the two except you call them with the same name. But that's what arguments are for.

Ocean of Milk
Jun 25, 2018

oh yeah

Carthag Tuek posted:

Python code:
if happy and it in self.knowledge:
  self.hands.clap()

lol no unicode

if happy and it in self.knowledge:
 self.👏()

fun fact: doesn't work in code blocks

Ocean of Milk
Jun 25, 2018

oh yeah
I have a .emacs because dicking around
I enabled line numbers
I installed treemacs to get a project view
M-x treemacs
My project view has line numbers

The minimap plugin just creates a copy of your current buffer with braille characters (or Profont or whatever) at text size 3

Please stop putting everything in effing text buffers. Deprecate terminals. Make the mouse behave normally.

Ocean of Milk
Jun 25, 2018

oh yeah
It's feels untypically unprecise for mathematics that logarithms are so rarely written out with the base. Like supposedly in these CS type questions with binary search and stuff, it's usually 2, right? Aren't you supposed to write "log2 n" then? In other cases it's e (in which case you're supposed to write ln instead of loge, at least that's what I've been taught) and sometimes it is in fact 10 (which is supposed to be the default, i.e. if you don't write the base I assume it's 10)

Ocean of Milk fucked around with this message at 07:06 on May 27, 2021

Ocean of Milk
Jun 25, 2018

oh yeah
The Revolution will not be typed.

Ocean of Milk
Jun 25, 2018

oh yeah
amber in the streets (phone)
green in the sheets (puter)

Ocean of Milk
Jun 25, 2018

oh yeah

MrQueasy posted:

public interface EnumerableAssert<SELF extends EnumerableAssert<SELF, ELEMENT>, ELEMENT> {
(from AssertJ)

I just stumbled upon this at work:

code:
public abstract class AbstractIterableAssert<SELF extends AbstractIterableAssert<SELF, ACTUAL, ELEMENT, ELEMENT_ASSERT>,
                                             ACTUAL extends Iterable<? extends ELEMENT>,
                                             ELEMENT,
                                             ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT, ELEMENT>>
       extends AbstractAssert<SELF, ACTUAL>
       implements ObjectEnumerableAssert<SELF, ELEMENT> 
:psyduck:

(tbf, they documented it)

Ocean of Milk
Jun 25, 2018

oh yeah

Cool now do Lisp

Ocean of Milk
Jun 25, 2018

oh yeah

Plorkyeran posted:

that specific example compares unfavorably to using a regular expression ("^\s*([a-zA-Z]\w*)\s*$")

Can you or someone in the pro-regex group of posters explain what exactly the advantage that speaks in favor of regex is supposed to be? Leaving readability aside as that appears to be somewhat debatable (= people (not) assuming regex familiarity can be presupposed).

Ocean of Milk
Jun 25, 2018

oh yeah

Stringent posted:

what do you think he could have done that wouldn't have caused you to double down?

https://www.youtube.com/watch?v=vMKtKNZw4Bo

Ocean of Milk
Jun 25, 2018

oh yeah

my homie dhall posted:

so you're blaming your manager for not telling you to not to act like a dipshit?

Managers/higher-ups are indeed responsible for the behavior of their subordinates.
If an employee behaves inappropriately i.e. in ways that jeopardize work culture, the mission, client relationships etc. out of ignorance, the responsibility absolutely is on higher-ups to correct this behavior amicably and if no such attempt is made, no fault lies with the employee the major blame should be placed on the manager, not the employee.

Ocean of Milk fucked around with this message at 16:38 on Jul 19, 2021

Ocean of Milk
Jun 25, 2018

oh yeah
Didn't Apple stuff use to be the one that used CR only? Apple CR, Unix LF, Windows CRLF

Ocean of Milk
Jun 25, 2018

oh yeah

Kernel Sanders posted:

has anyone here used onion/hexagonal/“clean”[1] architecture? at face value it makes a lot of sense and coupled with the mediator pattern makes for easy writing of very small and focused chunks of code which are easily testable.

[1] I love how “uncle” bob just up and slapped a name on something existing and usurped ownership of it

We're in a tech migration project large parts of which is copy+pasting quite a bit of java code into a new codebase and one of the parts where we go beyond c+p is decoupling things into onion style adapters that are only allowed to communicate via the domain/core/thing-in-the-middle. I guess it's more elegant than before, and it should assist us to change/re-think the DB schema in the future without touching the core (persistence is one adapter), which is one of the things we might want to do. Ofc the interfaces in the domain need to be well tested for this cause that's how you actually ensure the contract does not get broken.
Our senior (I'm noob) gets all giddy like "we could switch our messaging from JMS to Kafka with little new effort" when obviously that's never gonna happen.
If you're in java, use ArchUnitTest. It allows you to specify a unit test that fails when you violate your architectural pattern. Pretty cool, at this point I think this whole architecture thing is worthless without some thing slapping you when you ignore it.

Ocean of Milk
Jun 25, 2018

oh yeah
I must have a different definition of configuration because we do spring and absolutely still have config files at runtime for different environments, and those files are not part of the code repo. There's no getting rid of those (well theoretically you could hardcode all this stuff (e.g. your DB URL) into the app, but... surely not?)
Yeah, there's stuff that used to be xml at compile time and is now annotations (@Bean and friends), but that's not even what I'd call "config files"

Ocean of Milk fucked around with this message at 09:56 on Sep 4, 2021

Ocean of Milk
Jun 25, 2018

oh yeah
That would actually be easier to understand.

Ocean of Milk
Jun 25, 2018

oh yeah

Private Speech posted:

(there -is- a lot of replacements)

Do you have any data supporting this claim? If my experience in the middle of europe is any indication, it is (and has basically always been) real hard to find any capable developers above junior grade because they're so very rare.

Ocean of Milk
Jun 25, 2018

oh yeah
Writing C++ properly means switching to a different language, so they did everything right.

Ocean of Milk
Jun 25, 2018

oh yeah
All schooling is like this.

Ocean of Milk
Jun 25, 2018

oh yeah

pokeyman posted:

this is the bit Plorkyeran is talking about, as an example of a time the author came away from an interaction where he reckons the other person thought he was stupid:

I haven't tried it, but I find it easy to believe that I would need a few tries to convince the salesperson that I really do only care about the size of the box. and I also have no trouble imagining the salesperson's impression that I am a weirdo for insisting in that

Or he could just explain his reason for wanting a smaller box so the other person doesn't have to think "what's wrong with this guy, basing his purchase of a $$$ computer on the size of the box". Of course that runs the risk that the other person will identify a flaw in his reasoning, and then he'd be wrong! Oh no!
It's like those stack overflow questions going "how do I do [stupid thing X]" without going into detail how they ended up wanting to do X and then people rightly asking "X is highly unusual as well as difficult for good reasons, is going to hurt you in the long run and you shouldn't want to do it, what's the actual problem that you're trying to solve?" because usually it's the general approach that's completely wrong and led to them wanting X.
Ofc Luu did not see that option, the only alternative he was able to conceive was going "I'm a very smart computer person and you lowly salespeon couldn't possibly imagine why box size is important for my computre purchase, fetcheth he the boxes forthrightly"

Ocean of Milk fucked around with this message at 20:48 on Oct 22, 2021

Ocean of Milk
Jun 25, 2018

oh yeah

CRIP EATIN BREAD posted:

I see this a lot and it's really starting to drive me nuts. Last night I helped a client with some SSL cert poo poo they couldn't figure out , just because I felt bad that if it broke a lot of people would be going through some health care nightmares because a cert expires in a few hours.

These dudes kept telling me "We have no idea why it's not working, can you help us? We go to the test endpoint in chrome and get an error. No idea what it is." One guy shares his screen and it's a chrome error page, but they didn't expand the information at all. They spent 2 days randomly fiddling poo poo in CSRs and testing them WITHOUT LOOKING AT THE loving ERROR.

Clicking the "Advanced" button expanded and said that the certificate had no SAN set. I said: "you need a SAN for this to work." "No, we did that already, look at this cert" and another error popped up. Clicking "Advanced" clearly says that the certs name doesn't match. Looking at the cert, it was clear that the SAN didn't match what they were typing in.

This is a great example because I can somewhat relate to those guys as SSL/TLS is a topic that is completely impenetrable to me. I can't get myself to understand it at all, does it have relation to public key cryptography? What's the difference between a certificate and a key? Does it have keys? Is that in the truststore.jks thingie? What the gently caress even is an SAN? These are difficult questions, because those systems are impossible to describe. I have the same feeling with regards to Spring, I just know "If I want a thing to depend on another thing I write the code, do @Bean in one place and @Inject in the other." or "If I want a DB table I do @Entity." but something like @Transactional eludes me completely (don't try reading the javadoc, you'll go mad). I guess the anithesis to this is that Computers can be understood.

Those guys obviously had no clue what you were talking about when you said "you need a SAN for this to work" and they tried to pretend that they did. I would have said "cool, so what does that even mean?" because thankfully I don't have that many problems with admitting not to know something, at least when dealing with people I know and who know me. What drives me mad is when me admitting knowledge gaps about opaque black magic like TLS provokes reactions like I just admitted to not knowing what an if Statement is. I'll quote from this great paper:

quote:

Signs of psychological unsafety in teams: “My team is slow to offer help to people who are struggling.”

Karen was new to being on-call for a “production” system, so had no formal training in incident management, production hygiene, or troubleshooting distributed systems. Her team was mostly made up of people with decades of experience, who never needed training or new-hire documentation. There were no signals that it was OK for a new graduate to spend time learning these skills.

Karen was terrified of being left with the pager. She didn’t understand how she passed the hiring process, and frequently wondered why she hadn’t been fired yet. We call this Imposter Syndrome.

I think that's called Learned Helplessness.

Ocean of Milk
Jun 25, 2018

oh yeah
Recognizing and removing the codebase-specific part is not hard though.

Ocean of Milk
Jun 25, 2018

oh yeah
I had or still have that as well, including during my time as an apprentice. My guess in my case it's a side effect of mild imposter syndrome and some self-worth issues.

Ocean of Milk
Jun 25, 2018

oh yeah
Git commit message formatting "best practices" are a result of how Torvalds wants it done on the kernel repo, a realm full of people who actually do their mail through pine or mutt, are subscribed to mailing lists and know wtf a /var/spool is. Their editors have elegant, efficient and scriptable modal languages for navigating and manipulating plain text, but they can't do soft wrap, so the solution is a convention that first line has to be 50 chars max because else git log runs off the screen since these people also actually run their terminal emulators in 80x25 even though those emulators have supported resizing for over thirty years now. There's probably an instance of Torvalds wishing pestilence on an IC on LKML for every single of those conventions.

Ocean of Milk
Jun 25, 2018

oh yeah
The Binding of esac

Ocean of Milk
Jun 25, 2018

oh yeah
As an application developer I want to add the row buttId to table farts so that my stupid program works and I can go drink beer and play ping pong.

Ocean of Milk fucked around with this message at 13:28 on Dec 9, 2021

Ocean of Milk
Jun 25, 2018

oh yeah

FalseNegative posted:

Day 14 is gradually driving me insane. I know the solution I need, but I'm double counting somewhere and just can't get it to work.

We tried to do that one together with the intern yesterday. Later when I went to bed it occured to me that you're probably supposed to mutate a linked list, cause you won't have the duplication problem then (which otherwise leads to a special case at the beginning or end of the chain), you just insert the values.

Ocean of Milk fucked around with this message at 08:03 on Dec 23, 2021

Ocean of Milk
Jun 25, 2018

oh yeah
Edit: in hindsight let me not post about this on the internets just yet.

Ocean of Milk fucked around with this message at 17:35 on Nov 16, 2023

Ocean of Milk
Jun 25, 2018

oh yeah
I would simply work for a state actor in a tiny one-timezone country that will never need to handle non-LocalDates.
What do you mean we might get rid of DST?

Adbot
ADBOT LOVES YOU

Ocean of Milk
Jun 25, 2018

oh yeah
I like the take in https://youtu.be/ROor6_NGIWU?feature=shared&t=1445 starting 24:05 (TW: Rich Hickey, also note that this is from 2012), where basically the thesis is that you want to avoid your distributed system components to end up basically being objects at scale, every one of them having its own state and they call each other to manipulate their state and whatnot (i.e. a handful of CRUD stuff). Though I have no serious experience to back this up.

also https://grugbrain.dev has a good MS snark:

grugbrain.dev posted:

Microservices
grug wonder why big brain take hardest problem, factoring system correctly, and introduce network call too
seem very confusing to grug

Ocean of Milk fucked around with this message at 11:01 on Dec 14, 2023

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply