There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

samus12345 , in Is there anything we cannot learn from the wisdom of ancient Japan?
@samus12345@lemmy.world avatar
ChubakPDP11 , in I had to design a simple general purpose language for university, so I tried creating "ZoomerScript" with Jetbrains MPS

People are designing languages with JetBrains MPS and I am making an AWK interpreter in C with Yacc, Lex and my own implementation of ASDL. Why do I do this to myself? It seems like the technology I like is way behind. Like C is a language created for freaking mini-computers like VAX and PDP-11 and I still use it? I knew about MPS, I just felt a strong dislike towards it. Now that I am no longer a pill addict, I have to reconsider the technology I choose to implement my stuff. C lacks portability, and QoL features.

(Psyche! All you n000bz can be stuck with your Fischer-Price toys — I’ll do it MY way, the 70s WAY!!!1)

MinekPo1 ,
@MinekPo1@lemmygrad.ml avatar

don’t worry , it can always get worse . source : I implemented a esoteric programming language of my own making with just a parser (no lexer !) and a tree walking interpreter while reimplementing a standard library and depending on undefined behavior in python . honestly I fear that code more each time I look at it

AMDIsOurLord ,

We think alike friend

Don’t lose your passion, doing things the shit old way can also make you a better programmer in the newer paradigms

Although, I recommend you at least learn C++23

einsteinx2 ,
@einsteinx2@programming.dev avatar

Reading this comment and then looking up and seeing that your username ends with PDP11 was chef’s kiss

Scoopta ,
@Scoopta@programming.dev avatar

I choose option C, eclipse xtext

zepplenzap , in It's not DNS

Am I the only one who can’t think of a time DNS has caused a production outage on a platform I worked on?

Lots of other problems over the years, but never DNS.

bamboo ,

I have a coworker who always forgets TTL is a thing, and never plans ahead. On multiple occasions they’ve moved a database, updated DNS to reflect the change, and are confused why everything is broken for 10-20 minutes.

I really wish the first time they learned, but every once and a while they come to me to troubleshoot the same issue.

GammaGames ,

How would you prevent that?

synae , (edited )
@synae@lemmy.sdf.org avatar

While planning your change (or project requiring such change), check the relevant(* see edit) DNS TTL. Figure out the point in the future you want to do the actual change (time T), and set the TTL to 60 seconds at T-(TTL*2) or earlier. Then when it comes to the point where you need to make your DNS change, the TTL is reasonable and you can verify your change in some small amounts of minutes instead of wondering for hours.

Edit: literally check all host names involved. They are all suspect

bamboo ,

This. For example, if you have a DNS entry for your DB and the TTL is set to 1 hour, an hour before you intend to make the changes, just lower the TTL of the record to a minute. This allows all clients to be told to only cache for a minute and to do lookups every minute. Then after an hour, make the necessary changes to the record. Within a minute of the changes, the clients should all be using the new record. Once you’ve confirmed that everything is good, you can then raise TTL to 1 hour again.

This approach does require some more planning and two or three updates to DNS, but minimizes downtime. The reason you may need to keep TTL high is if you have thousands of clients and you know the DNS won’t be updated often. Since most providers charge per thousand or million lookups, that adds up quickly when you have thousands of clients who would be doing unnecessary lookups often. Also a larger TTL would minimize the impact of a loss of DNS servers.

ryannathans ,

Set it to 5 seconds ??? Profit

bamboo ,

??? Is when the underwear gnomes send you a massive bill because you’re paying per 1k lookups. They profit, you don’t

Tankton ,

“yes boss we need another 20 dns servers” “idk why dns traffic is so heavy these days”

AceFuzzLord , in Me after I got fired

I hope I learn some day how to code a bug in python that will not show up in any error messages and absolutely ruins a program. I’d love to find a random program at whatever job I end up at and before quitting just ruin it with a random line of code that doesn’t output an error code.

stembolts ,

It’s not hard to do. What would be hard would be getting it through code review. Like the example provided… how would that ever get through code review for a merge? Must not be a well-protected code base?

maynarkh ,

Publish your own package to PyPI that on import does some evil stuff. Name the package something similar to a known, but not too well known package. Supply chain attacks are even less defended against than other stuff.

All this relies on companies being shit though, but well, we all know that’s the case in a lot of places.

MotoAsh ,

Yea… pipeline and dependency auditing isn’t trivial if you want to catch the subtle stuff. Even most of the devs that know how to do it are going to respond with, “above my pay grade…” unless they’re somehow actually getting paid enough to be arsed to do it correctly…

MotoAsh ,

Logical errors are an entire domain of programmer troubleshooting. All you’ll have to do is attempt to learn programming, and you WILL write something that throws no errors, performs terribly, and confuses you for hours.

We all do. It’s almost a badge of honor to push past a few of them.

Hell, sometimes it happens when no one has made an error but a particular mix of data or odd arrangement of hardware it ends up running on hits an undiscovered edge case that buggers things up.

philm ,

Easy, it’s just… continue programming in python. (large codebases are a mess in python…)

More seriously: Don’t do that, it’ll only create headaches for your fellow colleagues and will not really hit those (hard) that likely deserve this.

deur ,

What the hell? Thats not funny or anything it just fucks with your ex-coworkers who probably werent the problem, management isnt affected by that.

Pro tip, you seem really arrogant these days and you need to tone that down before you enter the industry. Its nothing to be ashamed of and I’m not trying to insult you, you just assume your experiences are way more universally valid than they are.

lseif ,

learn C and u will get undefined behaviour for free :)

Stumblinbear ,
@Stumblinbear@pawb.social avatar

That’s just called malware

PoolloverNathan ,

<span style="font-weight:bold;color:#a71d5d;">import </span><span style="color:#323232;">os
</span><span style="color:#323232;">os._exit(</span><span style="color:#0086b3;">2</span><span style="color:#323232;">)
</span>
AAA ,

If you’re thinking about rage quitting a job you don’t even have yet, maybe take a different career from the beginning?

What the hell.

dylanTheDeveloper , in What if we added a social component like "Stories" to this calculator app?
@dylanTheDeveloper@lemmy.world avatar

12*2 = 24 and today I went to the store to buy some bananas but the all the bananas were too ripe

Blackmist ,

That banana’s name? Albert Einstein.

Schmeckinger , in What could go wrong trying to solve AoC in Rust?

You can’t really blame that on rust.

MaliciousKebab OP ,

Yeah ngl it’s very ugly. But hey as long as it works it’s not stupid amirite?

xlash123 ,
@xlash123@sh.itjust.works avatar

Rust borrows a lot of it’s design from functional programming languages like Haskell, which has its good and bad. You could also choose to implement this behavior iteratively like typical C programs, but that tends to be ugly in other ways.

Personally, I’ve grown fond of the functional style. You see it in other places too, like the higher order functions in JavaScript. What’s good about them in Rust is you still get amazing performance due to zero-cost abstraction. Trying to implement it yourself would likely be slower, so use them any chance you get.

Buttons , in Bug Fixing
@Buttons@programming.dev avatar

If that doesn’t work, sometimes your computer just needs a rest. Take the rest of the day off and try it again tomorrow.

DirkMcCallahan , in Bug Fixing

I often do this, but I always hit Ctrl-S before running it again. Shamefully, this probably works about 10% of the time. Does that technically count as changing nothing?

LazaroFilm ,
@LazaroFilm@lemmy.world avatar

That and a make clean can work wonders.

dependencyinjection ,

Autosave on focus loss dude.

muntedcrocodile , in ifn't
@muntedcrocodile@lemmy.world avatar

With ahit like that its not microsoft java its now microsoft javascript

ohlaph ,

That’s Typescript…

cupcakezealot , in Guys! Should I accept the offer? 😂
@cupcakezealot@lemmy.blahaj.zone avatar

seems legit tbh

Fizz , in what the hell is happening in ultramarine linux
@Fizz@lemmy.nz avatar

Imagine the smell of that office

hikikoma , (edited )

MUTHKY

CannotSleep420 , in “It’s not that hard”
OsrsNeedsF2P ,

Musk wants to know how much the system costs. The information being provided seems as relevant as the article telling us the engineer was a “mother of two”.

The more I look at this quote the stupider it gets, which is a shame because the article is quite informative

hypnotic_nerd , in Rust project startup kit
@hypnotic_nerd@programming.dev avatar

Very small projects 😂 after mastering it try building whooping to-do app in rust!

sheepishly , in Let me just move this project to the "unfinished" folder
@sheepishly@kbin.social avatar

Just release unfinished DLC for $35, release a "definitive version" even though that was only the first half of the DLC, release the even more unfinished second half of the DLC and still leave a bunch of shit from the base game unexplained. Yeah I'm still salty about something, how'd you know?

Ethanice ,

This sounds like Destiny but I’m not sure.

sheepishly ,
@sheepishly@kbin.social avatar

It's Pokemon

Oha , in 1 follower on GitHub = 1000 followers on other platforms 😅

github ≠ Social Media

hypnotic_nerd OP ,
@hypnotic_nerd@programming.dev avatar

So is the twitter 😅

sabreW4K3 ,
@sabreW4K3@lemmy.tf avatar

!=

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines