• 2 Posts
  • 35 Comments
Joined 1Y ago
cake
Cake day: Jun 19, 2023

help-circle
rss

Yep, and align isn’t a real property, either.


It’s a typo. The colon should be a semicolon. But since it’s the last declaration, it’s optional.


I never understood this logic

You’re looking for logic in a joke.

Do you question why Donald Trump, the pope and a kid are the only passengers on a plane that’s about to crash?


More like

Problem → new ProblemSolverFactory().createProblemSolver().solveProblem();



I am a sky-high developer and know little of such low-level APIs. Please humor my ignorance: Isn’t it bad practice to write a god-method that sometimes uses these parameters, sometimes others? Isn’t this better refactored into multiple dedicated functions?


Finally! I haven’t had to maintain servers in the last few years, but I had to when the switch to ‘nginx Pro’ happened and all of a sudden basic documentation was buried in the who-knows-where.


What you’re showing here is an extra processing step, but I wouldn’t call that manual.

Yes, it’s not manual by the dictionary definition, but it is an extra step. This is another meaning of manual in my particular bubble [Edit: that I didn’t think to specify].

But a much better idea would be to use sensors -j to get json output, intended for machine reading, and pass that to jq.

This is my initial point, exactly. Dealing with objects is way easier than using the ‘default’ line-wise processing. Only Powershell made that the default, while in Linux you need to hope that utilities have an option to toggle it on – and then also have jq installed to process the objects.

I look forward to seeing how you would do this in PS. As I said previously, I don’t know it at all, so I’m not sure what you’re comparing this to.

[Edit, since I forgot to answer your main point:] I don’t program in PS. I don’t like the verbosity. But I do think MS has a point in pushing objects as the prime unit in processing instead of lines.


For instance: Get the temperature of the “Composite” sensor from this output:

$ sensors
k10temp-pci-00c3
Adapter: PCI adapter
Tctl:         +37.1°C  

BAT1-acpi-0
Adapter: ACPI interface
in0:          16.07 V  
curr1:         1.80 A  

amdgpu-pci-0500
Adapter: PCI adapter
vddgfx:        1.46 V  
vddnb:       918.00 mV 
edge:         +35.0°C  
slowPPT:     1000.00 uW 

nvme-pci-0200
Adapter: PCI adapter
Composite:    +28.9°C  (low  =  -5.2°C, high = +79.8°C)
                       (crit = +84.8°C)

acpitz-acpi-0
Adapter: ACPI interface
temp1:        +37.0°C  (crit = +120.0°C)

Without a cryptic awk incantation that only wizards can understand, that would be:

sensors | grep Composite | grep -Po 'Composite:.*?C' | grep -Eo '[[:digit:]]{1,2}\.[[:digit:]]'


Don’t you think immediately getting the property you’re interested in from an object is easier and more readable than first grepping some output to get the line you want and then removing the leading and trailing garbage on that line manually?

I thing PS scripting would be much more fun if the words weren’t so annoyingly long.


If you edit code with find/replace, you need a better IDE. Just a hint.


That’s where my ecosystem shines, since it’s all open source. If there’s a bug that I can fix, but the maintainer won’t, I’ll just fork the repo.


cross-posted from: https://feddit.de/post/7998742 > Meme transcription: 4 panels of Vince McMahon reacting increasingly ecstaticly to: > > 1. Your software isn’t working. Vince McMahon looks curious. > 2. The bug is in a library. McMahon smiles. > 3. There already is an issue on Github. McMahon makes an orgiastic face. > 4. They published a fix last week. [I don’t know how to describe the face McMahon is making.]
fedilink

You forgot to mention that you might get it twice, or thrice, or more, and in different versions.


I’m surprised that after almost 20 years of versioning C code, git still manages to assign the closing brace of a function wrongly.



I mean, nowadays you can get wireless internet – via LTE/5G. For technologically illiterate users, I’d put the blame on whoever sold them a WiFi router.


I understand them. Someone saying they took the troubleshooting steps doesn’t mean they took them.

Also not everyone is on the same technical level. “I pressed the button on the screen. I thought that means the modem is off!”



Meme transcription: Panel 1 of 3: A cute dog looks asks, “pls fix problem??” Panel 2 of 3: The dog has become upset and says, “No Info!!” Panel 3 of 3: The dog looks very angry and says “only fix”
fedilink

There are also games that don’t render a square mile of a city in photorealistic quality.


You can write concise Java. Just like you can write readable Haskell. It’s just not idiomatic to do so.


It’s not client-side anymore. You need a backend to produce the HTMX.


Are web servers that serve real HTML responses still a thing? Honest question. I thought JSON+client side rendering were the default by now.


For which language do you have to pay the language inventor to use it?

  • That sentence may be grammatically … questionable …, but I don’t know how to write that correctly now.


I’ve looked at the webpage, a blog post “How I use HackMD in FOSS”, the intro to the documentation, the features page in the documentation, and I still can’t find out what this thing is supposed to be doing. Is it a wiki? Is it a tool to extract documentation from source code?




I feel like there may be a reason to this. It looks like the flowers got recently moved. Maybe it was in the way of the main footpath that sees the most traffic? I can see it getting moved if people repeatedly tripped over it at night or when drunk.

Remember kids, shitty code isn’t shitty until you find out how it came about.


“PR” lol. I’m the sole developer.

Jokes aside. I find it easier to have all the information in a commit message, so I can browse it in the git log without having to find the relevant PR(s) that finally merged it.


I don’t feel like “ditch comments” is the right solution to “we {forget, don’t care enough} to update comments”.


How much can you really put in 50 characters?

Fix: NPE in customer download component when users – That’s 50 characters. Should I not mention where I fixed the bug?

Fix: NPE when users downloaded customers without s – I think I can get rid of the actor in some cases.

̀ Fix: NPE when downloading customers without select`. The summary I want to give cannot be truncated any further.

Fix: NPE when downloading customers. This fits, but is so vague as to be pointless as a summary, in my view.


We’re lucky in that the inventors of our technology are still alive (for the most part). So we can ask them: Linus Torvalds on git commit messages


My personal cent: Some tools strongly suggest that your commit messages should not exceed 50 characters in the first line, and 80 characters on every other line. While the 80-character rule makes sense if you’re using a terminal (and someone on your team will even if you don’t), I strongly disagree with the 50-character rule. If you want to be in any way clear what you did, 50 characters is simply not enough even for the subject line.


Hot take: Even these ‘useless’ comments help, since they relieve you of the burden of reading the code itself, even if it’s trivial. One line of English is easier to parse than one line of trivial code.