I feel like there’s a specific peak between total technical ignorance and a weary understanding of how fickle technology can be. On this peak is the height of arrogance, where you believe you’ve really got everything figured out. Part of learning is understanding that, yes, sometimes you really did just forget to plug the modem in.
Yep, that one where the person on the peak starts lecturing you in abstract terms about trying the simplest hypotheses and such, while you are trying to solve their problem.
I know the philosophy part that asshole is talking about, only he has no bloody clue which part is simple and which is not here.
Just fyi, Randall who makes xkcd has a very permissive approach and offers hotlinks on the site for easy embedding. I think he prefers that you hotlink rather than reupload.
The thing is that for a majority of cases, this is all one needs to know about git for their job. Knowing git add, git -m commit “Change text”, git push, git branch, git checkout , is most of what a lone programmer does on their code.
Where it gets complicated real fast is collaboration on the same branch. Merge conflicts, outdated pulls, “clever shortcuts,” hacks done by programmers who “kindof” know git at an advanced level, those who don’t understand “least surprise,” and those who cut and paste fixes from Stackexchange or ChatGPT. Plus who has admin access to “undo your changes” so all that work you did and pushed is erased and there’s no record of it anymore. And egos of programmers who refuse any changes you make for weird esoteric reasons. I had a programmer lead who rejected any and all code with comments “because I like clean code. If it’s not in the git log, it’s not a comment.” And his git comments were frustratingly vague and brief. “Fixed issue with ssl python libs,” or “Minor bugfixes.”
I had a programmer lead who rejected any and all code with comments “because I like clean code. If it’s not in the git log, it’s not a comment.”
Pretty sure I would quit on the spot. Clearly doesn’t understand “clean” code, nor how people are going to interface with code, or git for that matter. Even if you write a book for each commit, that would be so hard to track down relevant info.
Yeah, I think that guy only got a superficial understanding of what Uncle Bob was saying.
My policy as a tech lead is this: In an ideal world, you don’t need the comment because the names and the flow are good. But when you do need the comments, you usually really need those comments. Anything that’s surprising, unusual, or possibly difficult to understand gets comments. Because sometimes the world is not ideal, and we don’t have the time or energy to fully express our ideas clearly in code.
My policy on SCM logs is that they should be geared more towards why this commit is going in, not what is being done. And what other tickets, stories, bugs it relates to.
Lead of a small team of scripters here. The “Why. Not What” is defo a good way of encouraging cleaner code.
Had to request changes recently on a PR like this, big function with comments telling me what it was doing. When they resubmitted for review they had broken it down into smaller functions with good variable/function naming. following what was going on was much easier
Same strategy here, but recently found myself commenting on the “what”. There was a perfect built-in, but not really readable and I couldn’t figure out how to make it readable, so fine
We solve that problem using naming conventions. Branch names must start with the issue key (we use Jira). You don’t do anything in that branch that’s not part of that issue. If you do, you must prefix the commit message with the issue key that it goes with. The commit itself identifies what changed. The Jira issue provides all the backstory and links to any supporting materials (design docs, support tickets, etc). I have to do a lot of git archeology in my role, and this scheme regularly allows me to figure out why a code change was made years ago without ever talking to anyone.
But when you do need the comments, you usually really need those comments.
It’s nice to see you sharing my experience. My code is either uncommented or very severely commented with comment-to-code ratios of 10:1 or more. I hate the files that are soo green… :(
It’s not git that’s complicated. The work is complicated. git is just one of the tools that programmers use to manage the complexity.
I also think that some people get too hung up on having a “clean” history, and trying to “fix” the history after it has already occurred. I usually have enough problems to worry about in the present, without also trying to worry about the past.
I like to rebase on my feature branches before the PR because it’s a gift to my future self that resolves all the conflicts (if any) before my work goes in. I just find trying to figure out how those conflicts got resolved when there are a bunch of merges in more difficult if there’s a problem later. It’s easier to understand for me. YMMV, this does not work for everyone. Etc etc.
Sure, if you’re they type to micro commit, you can squash your branch and clean it up before merging. We don’t need a dozen “fixed tests” commits for context.
But in practice, I have seen multiple teams with the policy of squash merging every branch with 0 exceptions. Even going so far as squash merging development branches to master, which then lumps 20 different changes into a single commit. Sure, you can always be a git archeologist, check out specific revisions, see the original commits, and dig down the history over and over, to get the original context of the specific change you’re looking into. But that’s way fucking more overhead than just looking at an unmanipulated history and seeing the parallel work going on, and get a clue on context at a glance at the network graph.
Using curated commits to optimize for pull request reviewability is highly underrated. Liberal use of interactive rebasing to ‘tell a story’, essentially.
In other news, never work more than one person on a branch (that’s why we have them). Make a new related issue with its own branch and rebase whenever necessary, and don’t even think about touching main or dev with anything but a properly reviewed and approved PR (in case they aren’t already protected), or I’ll find and report you to the same authority that handles all the failed sudo requests!
Also, companies that disable rebasing are my bane. While you can absolutely do without, i much prefer to have less conflicts, cleaner branches and commits, easier method to pull in new changes from dev, overall better times for the reviewer, and the list goes on. Though, the intern rewriting multiple branches’ history which they have no business pushing to is also rather annoying.
This is so incredibly dumb, though I’m sure I don’t have to tell you this. That comment will be buried in the git log if anyone ever fixes a typo on that line.
yeah I’ve really noticed it’s hard to find info and therefore use any project that does this.
and it must suck because anyone new, instead of finding the answer to their question in a forum archive from when it was first asked, has to log in and ask it again.
whenever I have dumb noob questions on setup and I see a discord link I give up a little.
My biggest pet peeve is when you join a new server and you have 15 different steps you have to do before you can ask a question. Verify with a bot or two, send picture drinking verification can, send emoji here, ask for emoji there, introduce yourself, publish your whole biography, wait for the pope to bless your account, and then, maybe, you are allowed to use the #help channel. I’m not a discord user, I don’t know what this all means ffs!
dude i give up completely, you think im joining a random discord full of a bunch of people i dont know with a culture of who knows what dialect?
Nah fuck that i’ll just go use some dudes random piece of scrapped together software that’s actually pretty based instead. To that guy who wrote the bash script for flashing windows ISOs under linux. Thank you.
Why limit yourself like that? Just say “All languages”. Depending on how liberally you interpret the word “language”, you know know just about everything.
Oh you don’t want to know exactly how many pubes your grandmother shed in her lifetime? You don’t care to know what the sewage of tasted like in London on Sunday, the 16th of July 1882? You don’t burn with desire to learn what it feels like to get your viscera torn out by a hungry lion?
I dunno. You’d know exactly what it looks and smells like too, and what it’d feel like on your tongue. Depends on how vivid your imagination is.
I can’t visualise things, but when people ask me to “visualise an apple” I can feel the waxy exterior, the crispness (or gumminess of an old apple), the slightly floral scent before you bite into it, what it sounds like, etc.
Can’t fucking visualise it to save my life though.
I can imagine sensation if I want, but as a ‘for instance,’ I know I don’t like some foods because of certain sensations, but don’t have to perceive them when I remember why. I can’t imagine that most people aren’t the same, or we’d have a lot more people gagging randomly as they walk around. Sure, some people will be slightly perturbed if you mention certain things, like fecal matter, horrible farts, the feeling of biting down on aluminum… but those perturbations pass in moments.
Interesting! There’s a particular type of fabric I cannot stand, and every time I think of it I get the sensation of touching it. Doing my best to not fling my phone away.
My old man told me he took one programming language in college and it was APL. Having looked at APL since becoming a software dev myself, I can understand why he hated it.
<span style="color:#323232;"> MODE UNIVERSE = [upb OF class universe, upb OF class universe]BOOL; STRUCT( INT upb, BOOL lifeless, alive, PROC(REF UNIVERSE)VOID init, PROC(REF UNIVERSE)STRING repr, PROC(REF UNIVERSE, INT, INT)VOID insert glider, PROC(REF UNIVERSE)VOID next ) class universe = ( # upb = # 50, # lifeless = # FALSE, # alive = # TRUE, # PROC init = # (REF UNIVERSE self)VOID: FOR row index FROM LWB self TO UPB self DO init row(self[row index, ]) OD, # PROC repr = # (REF UNIVERSE self)STRING:( FORMAT cell = $b("[]", " ")$, horizon = $"+"n(UPB self)("--")"+"l$; FILE outf; STRING out; associate(outf, out); putf(outf, (horizon, $"|"n(UPB self)(f(cell))"|"l$, self, horizon)); close(outf); out ), # PROC insert glider = # (REF UNIVERSE self, INT row, col)VOID:( self[row-2, col+1] := TRUE; self[row-1, col+2] := TRUE; self[row, col:col+2] := (TRUE, TRUE, TRUE ) ), # PROC next = # (REF UNIVERSE self)VOID:( [0:2, LWB self-1:UPB self+1]BOOL window; # init row(window[LWB window, ]); window[LWB self, 2 LWB window] := window[LWB self, 2 UPB window] := window[UPB window, 2 LWB window] := window[UPB window, 2 UPB window] := lifeless OF class universe; window[LWB self, LWB self:UPB self] := self[LWB self, ]; FOR row FROM LWB self TO UPB self DO REF []BOOL next row = window[(row+1) MOD 3, ]; IF row NE UPB self THEN next row[LWB self:UPB self] := self[row+1, ] ELSE init row(next row) FI; FOR col FROM LWB self TO UPB self DO INT live := 0; FOR row FROM row-1 TO row+1 DO REF[]BOOL window row = window[row MOD 3, ]; FOR col FROM col-1 TO col+1 DO IF window row[col] THEN live +:= 1 FI OD OD; self[row, col] := IF window[row MOD 3, col] THEN live -:= live = 3 FI OD OD ) );
</span>
That's actually not that rare when I work later than usual. Some stupid problem my brain is too fried to solve. Eventually I give up, feeling defeat for the whole evening and solve the problem in 10 mins the next morning. Get enough sleep, people.
However, much research shows the hand banging against the wall period is required for you to achieve the morning breakthrough.
The sleeping break is where your neurons form new connections based their activity yesterday. The “thinking hard” and the frustration is a required part of the morning epiphany.
The wasm ABI allows for a bit more flexibility than the C one.
I’m not sure how much impact it has on practice (probably very little, otherwise somebody would have fixed it), but in native code there’s a lot of potential for mismatching behaviors from the two different runtimes.
No, but GUI frameworks can generate it for you. Same goes for DOM access, for which there’s normally only a JavaScript API.
So, you’ll likely want to read JS, when researching what events or properties you can read/write for certain HTML nodes in the DOM, but with a mature GUI framework, you should not need to write any JS.
You can even compile Fortran code to wasm and run it on a web browser. Who need Javascript’s puny 64bit floating point precision when you can have Fortran’s superior 128bit floating point precision?
Companies hate OpEx and love CapEx. That’s the main driver as companies loathe hardware life cycle costs and prefer a pay as you go model. It is more expensive but it’s more budget friendly as you avoid sticker shock every 3-4 years.
Do you mean that it’s still the case that more resources are allocated than actually used or that the code does not need to be optimized anymore due to elastic compute?
If I remember correctly, that was the original idea of AWS, to offer their free capacity to paying customers.
Do you think that AWS in particular has this problem or Azure and GCP as well? I have mainly worked with DWHs in Snowflake, where you can adjust the compute capacity within seconds. So you pay almost exactly for the capacity you really need.
Not having to optimize queries is a good selling point for cloud-based databases, too.
It is certainly still cheaper than self-hosted on-premises infrastructure.
We worked with a business unit to predict how many people they would migrate on to their new system week 1-2 … they controlled the migration through some complicated salesforce code they had written.
We were told “half a million first week”. We reserved capacity to be ready to handle the onslaught.
fun fact, an early iPhone jailbreak would always change the phones wifi mac to the same address, so there was a meme for a while that if you had a jailbroken iPhone you couldn’t use airport wifi
programmer_humor
Top
This magazine is from a federated server and may be incomplete. Browse more on the original instance.