Fair, though I guess my interpretation was that void* is kind of like a black hole in that anything can fall into it in an unsettling way that loses information about what it was?
It makes more sense if you think of const as “read-only”. Volatile just means the compiler can’t make the assumption that the compiler is the only thing that can modify the variable. A const volatile variable can return different results when read different times.
I thought of it more in terms of changing constants (by casting the const away). AFAIK when it’s not volatile, the compiler can place it into read-only data segment or make it a part of some other data, etc. So, technically, changing a const volatile would be less of a UB compared to changing a regular const (?)
const volatile is used a lot when doing HW programming. Const will prevent your code from editing it and volatile prevents the compiler from making assumptions. For example reading from a read only MMIO region. Hardware might change the value hence volatile but you can’t because it’s read only so marking it as const allows the compiler to catch it instead of allowing you to try and fail.
I was thinking about telling them how in embedded systems it’s a good practice to allocate the memory by hand, having in mind the backlog, but yours will come first
AFAIK when it’s not volatile, the compiler can place it into read-only data segment
True, but preventing that is merely a side effect of the volatile qualifier when applied to any random variable. The reason for volatile’s existence is that some memory is changed by the underlying hardware, or by an external process, or by the act of accessing it.
The qualifier was a necessary addition to C in order to support such cases, which you might not encounter if you mainly deal with application code, but you’ll see quite a bit in domains like hardware drivers and embedded systems.
A const volatile variable is simply one of these that doesn’t accept explicit writes. A sensor output, for example.
I’ve never really thought about this before, but const volatile value types don’t really make sense, do they? const volatilepointers make sense, since const pointers can point to non-const values, but constvalues are typically placed in read-only memory, in which case the volatile is kind of meaningless, no?
Maybe there’s a signal handler or some other outside force that knows where that variable lives on the stack (maybe through DWARF) and can pause your program to modify it asynchronously. Very niche. More practical is purely to inhibit certain compiler optimizations.
That seems like a better fit for an intrinsic, doesn’t it? If it truly is a register, then referencing it through a (presumably global) variable doesn’t semantically align with its location, and if it’s a special memory location, then it should obviously be referenced through a pointer.
Yeah, same in the UK. Really annoyed me that the plumber, electrician… etc were all engineers. In Germany it’s as protected as calling yourself doctor, which ultimately affects how people view the profession and the salaries they command
I mean, it’s a protected term in Canada too but it doesn’t necessarily lead to higher salaries.
My cousin who’s an electrician made about as much as I did as an electrical engineer, and I left electrical engineering to be a software developer because it paid more. Engineering paid more than being an electrical technician / designer, but not by a huge amount.
I left aeronautical engineering to become a software “engineer” for similar reasons, salary and work culture. Actual engineering pays quite terribly in the UK, it’s a fair bit better in Germany or the US from what I hear.
Yeah it’s difficult for me to name my title in English 'cause the word doesn’t exist. I went to a technical high school, not university. (Not college!)
It does not only dictate your professional life/status in Germany, being a doctor, your social as well. Someone I know got a postdoc in germany, no luck finding a place to live until they started asking their german collegues to call and saying “doctor so-and-so is looking for an appartment”. So, he gets one. The guy has a very long full name, so the nametag the landlord is gonna put on the postbox is way to long, but if you cut off the part where it says he is a doctor, it would fit. He insists to cut that part away, the landlord just refuses, says fuck your name and person basically, and cuts off part of his last name instead. Saying you are a doctor gets you first in fucking everything (maybe not lufthansa, then they just say ‘senators’ or something). Extremely class divided social society that.
Hmmm. But all the people around me working in software studied multiple years in an Engineering field. In my case, I studied a 5-year industrial engineering and two masters afterwards; I feel very comfortable wearing the “software engineer” or more accurately “robotics engineer” badge.
No, that’s precisely the opposite of my point. If you drive an Uber, you’re an Uber driver. People are “CEO” or “Judge” despite nobody having a CEO or Judge degree. Your profession is what you do, not what you happened to study in your teens to get there.
I understand your point now and I agree. Your colleagues that studied engineering became programmers. Why do people treat this as if that’s bad? It’s a beautiful profession.
I don’t think it’s bad, in fact I wonder the same. These are my colleagues because it’s the same path I took - I now work developing self-driving cars (I slowly transitioned from aerospace to manufacturing automation to robotics) and it’s the most rewarding job I’ve ever had, and it feels very much like engineering. I don’t care if I’m not a “manufacturing engineer” anymore; I really like my job and I like my title to reflect somewhat accurately what I do, but that’s the extent I care about it.
How come they don’t count? They’re figuring out how the machines should work, for money. That’s engineering, right? (I’m an American mechanical engineer)
In Canada you have to be qualified and licensed to call yourself an engineer. There are people who can use the title “software engineer”, but it’s not the majority of people working in development.
Softwareingenieur darf man sich nennen, wenn man ein mathematisch-naturwissenschaftliches Fach studiert hat, wo Informatik dazugehört. Somit ist Software Engineer oder Softwareingenieur die korrekte Berufsbezeichnung für alle mit einem Bachelor/Master oder höher in Informatik.
That is not entirely true. It’s a bit more complicated. Yes it is protected since the 1970s but it’s more of an academic title. You needed to study something that is “mainly” of technological or scientific nature. Basically befire the Bologna reform every student in Tec. Unis/FHs did get the title Diplom-Ingenieur. So the engineer part was literally part of your degree. This of course also true in case you studied IT. So yes there are many who call themselves IT engineers also in Germany. However it’s more of a philosophical question how much software development is actually engineering or rather craftsmanship.
No, actually C#'s answer should be: “What Java said - hold on, what Python said sounds good too, and C++'s stuff is pretty cool too - let’s go with all of the above.”
C#, or as I like to call it “the Borg of programming languages”.
I got my first software developer role last year and it was the first time I’d written C#, I was more TypeScript. Now we use both but I must say I really like C# now that I’m used to it.
I think most programmers would like C# if they spent time with it. It is getting a bit complex because the joke about it over borrowing from other languages is on the money. It is a nice language though and pretty damn fast these days all things considered.
There’s too much MS in the language and runtime for me. The fact that it gives my Linux programs DLL files and the fact that by default the SDK phones home makes me run away in horror from not only writing it but also running other projects written in it.
The biggest selling point about functional languages for me is the type system, mainly algebraic/union types (which imo Scala does the best), pattern matching (and imo Rust does this best), and the incredible type inference, but also all the functional features. But I think the best part about F# specifically comparing it to C# is the removal of a shit ton of the boilerplate. Plus data is immutable by default, always a nice touch.
For F#, the special types may not be super relevant when interacting with C# libraries, but in general you can do everything in F# that you can do in C#, including all the OOP. It’s just an added bonus that you basically get enums on steroids and pattern matching.
I find that writing in F#, even if I write basically the same code I would in C#, speeds up my design/programming a TON and makes it significantly more maintainable and easy to navigate. There’s a lot less clutter and you don’t have to worry about the layers upon layers of repetitive boilerplate.
The only downside IMO is that F# can have some terrible error messages. And of course, you have to learn F# syntax which can be a small pain if you’ve never used ML or Haskell (especially when it comes to function call syntax). But if you’re mainly interfacing with C# libraries then it’s no big deal. I started making an application only utilising C# libraries (mainly DB stuff) the same day I started using F# and it went relatively smoothly, although probably because Rust is the main language I used then.
This resource might help, although I can’t say it’s enough to completely learn the language: fsharp.org/learn/
I don’t understand how anyone uses a paid API for a personal project. I looked hard into MS, Google and Amazon a few years ago for a project and couldn’t find anywhere where you could hard block services to never ever go above the free tier.
Considering that I’ll build a project and forget about it for years, putting in my credit card into a cloud service was a guaranteed gigantic bill sometime in the future when things went wrong. (Over your life, something is guaranteed to go wrong.)
Have you heard of virtual debit cards? You can’t charge what’s not there.
Also, at least AWS will in fact send you an email when you approach the end of free tour usage.
Having said all that, most devs can host the few hundred visits they might get over a month with a $200 home server and a free CloudFlare cache if they know what they’re doing.
All cloud providers will support budget notifications. That doesn’t do much good when you shoot past the budget in a short timespan. I set a Google cloud budget of $20/month and enabled a Tensorboard instance, which had no observable indication that it cost anything except the base cost of the VM, and got notified that I was $280 over budget the next day. Apparently there was an upfront $300/month/user fee for Tensorboard. (Several months later they changed the pricing model to $10 GiB/month with no user fee.)
But this is just one more example of our superiority - a perfect compromise between the file size and the nightmare that is two different invisible characters
After years of ass-whopping by python interpreter for stray tab characters, I’m now mentally rejecting the existence of tab character in my computing devices.
Y tho??? Holy shit. Commits should be like functions. One thing and one thing only. Maybe a small group of files like the same change over multiple config files. 50 is insane to me.
It's called Brook's Law. It takes a lot of time and effort getting people up to speed, and that takes experienced devs away from coding. You also have to get them credentialed, teach them the tools, need extra code reviews/testing/bugfixes while they learn the quirks and pitfalls of the code base, etc. In the long term you'll be able to get more done, but it comes at the cost of short term agility.
Maybe "credentialed" wasn't the right word. I was thinking of software licenses and access to third party tools and systems. Probably not as big a mess in game dev as it is in government.
You mean you didn’t enjoy sitting there when your thumb up your ass while you wait 6 months for a background check and another 6 months to get your GFE? Crazy!
Yeah, it happens everywhere, all the time. And the main cause of it is, surprise surprise, people who have no technical understanding of the subject matter.
If you have a troubled project, and you add more people, you have a bigger troubled project.
It’s a common trap for project managers … and in fact some pretty high brow projects blew up because of this.
When you are called in front of the board, and they say:
“Hey, your project is late, we get it, it’s not your fault, but we have to deliver on the 1st of the month. - and so we’re giving you our 10 best men to get it done”
I can tell you, it takes a certain amount of testicular fortitude to say “That won’t work”. More than I had at the time , in fact.
My anecdote isn’t quite the same since it deals with something a lot simpler, and lower stakes than stuff like this.
used to assemble bicycles for a sporting goods chain, and had to travel to a nearby city to build theirs because nobody there knew how. I had two days to get 300 done.
I got there and start, and about two hours in the store manager comes over and tells me he’s pulling 2 of their operations employees to help and learn how to build. “they’re the strongest guys we have so they should have no problem tossing these bikes around”
I straight up told him I have no time at all to train them on how to build and do the safety inspections correctly, not to mention the fact that I will still have to personally inspect every single one they put together anyway, so if they want to give me help I’ll take it but they’re on trash duty. Remove all the packaging, put the bike next to my work area, toss the trash. I will build. If there’s extra time at the end I will be happy to instruct everyone in the store how it’s done. Or even put me on the schedule for next week to do it.
Dude got pissy and wanted me to train people first, so I just called the district manager while he was talking and had him tell the guy to do what I said because I’m here at corporates request and if I don’t get the bikes finished in time then “it will look bad on your store’s next visit if the bikes are still boxed up”
In the end I got all of them done with about 3 hours to spare, so I spent the rest of the time teaching a couple people how to do it.
More like 12-14 hours, and with the experience I had I was able to build most in about 6-7 minutes.
There’s downsides to speed building like that, because whoever has to inspect it when it gets sold has to spend a lot longer fixing minor problems.
If I were building at my own store, each bike took about 20 minutes because I made sure everything was as close to “ready to ride” as possible.
Nowadays I bulk build for many companies. They don’t give a shit about quality but I spent years making sure my bikes were perfect, so I still like to make them good to ride out the door.
my quickest bike was one particularly well put together model. 3 minutes per bike and it was good enough that I’d ride one without tools to the nearest store a few miles away.
Big teams are faster on straightaways. Small teams go through the corners better. Upgrading from a go-kart to a dragster may just send your project 200mph into a wall. Sometimes a go-kart is really what you need.
Currently in a project, where for strategic and unrelated reasons, we ended up with 4 new juniors and had to hand off one senior. In a team that consisted of merely 3 people before.
So, it’s just me and another guy having to constantly juggle these juniors to push them back into the right direction and review whatever code they ended up with.
It’s so frustrating, because while I’ll gladly pass on my knowledge, the project has basically ground to a halt.
There’s so many tasks me and the other senior would like to just quickly tackle. Which should just take a few days, no big deal. Oh no, I rarely get a day’s worth of work done in two weeks. The rest is just looking after the juniors, who cannot tackle many of the actual crucial tasks.
And it’s not even like the juniors are doing a bad job. Frankly, they’re doing amazingly for how little support we can give them. But that doesn’t stop the project from falling apart.
If it helps, even devs have problems following the install instructions.
It could be for a lot of reasons. Usually it’s because it’s open source and we can’t test it for every possible configuration. Or we are just trying to code, not deal with the dozen other setups.
Me in particular, all my application projects don’t include node versions, and assume Linux. Even I forget that sometimes if I’m loading a old project and suddenly it doesn’t build, and I have to futz around for an hour eupdating packages.
Didn’t you know? All the cool kids these days skip documentation and just hang out on discord, where you can get a laggy response to your query about build dependencies in 2-3 business days.
Reminds me how many years ago I was complaining that people would go ask questions on irc instead of reading docs or posting on a forum so it could be indexed. Looks like nothing changed
I try to write documentation/instructions for dummies, because often, I’m the dummy when I have to dig back into the code again after not touching or thinking about it in months or years.
If it makes you feel even better, I’m a software engineer and I had lots of trouble learning to use GitHub and git, it’s embarrassing to admit it but I’m super glad I learned!
Git isn’t properly taught. I’ve studied programming both in college and in a boot camp, and both times they rushed right over git, showing only the bare essentials. This left me unprepared for the real world. I didn’t know how to do basic stuff like exclude files or even undo changes.
It’s so complex, they really should have a separate class for it.
Same. I learned about the ‘releases’ section only recently thanks to some kind Lemmy user (kinder than some I’ve seen on Lemmy and reddit discussing this same image, some people are openly supporting gatekeeping of software).
While this doesn’t work all the time, when it does, it’s really fast. Similar to the isPrime function, it’s correct most of the time and is much faster than alternative implementations:
What your code can do is run this first and if it returns false then do a quick double check using a traditional isPrime function. Really speeds things up!
Nah, you’ve always got to check the corner cases. It’s a variation on Murphy’s Law - you don’t encounter corner cases when you’re developing a program but corner cases are 99 percent of an everyday user’s interaction.
Better. Return true if the number is in a stored list of known primes, otherwise return false right away. But then, start a separate thread with an actual verification algorithm. When the verification is done, if it was actually a prime number, you just crash the program with a WasActuallyPrime exception.
what if we made a new type of blockchain? one that was powered by generative AI and the metaverse? oh! and could we make it so that it Empowers Business Solutions?
This can certainly be done as long as we stick to the five core values - take ownership, take the leap, act with integrity, put the customer first, and dare to innovate.
What we need is a paradigm shift in how we empower synergy between product lines through utilization of emerging technologies and strategic acquisitions to improve our KPIs across the platform.
It’s amazing the hoops people will jump through to deal with Windows’ bullshit but the moment Linux presents the slightest obstacle they write it off as “too hard to use.”
I kind of agree with you but there’s also the issue that when you have a problem with Windows, there are 30 people to tell you, “Here are the hoops, and here’s how to jump through them,” while on Linux there are often only 3-5 people, all telling you, “LOL wipe and replace your whole OS with the distro that I use because I don’t have that specific problem.”
I think it’s the other way around. I often find only one source (if any) for configuring windows, and it’s some registry edit that hasn’t worked for years. On linux, there will be a dozen people providing multiple ways of getting it done, most of which work.
You say that like switching to Linux doesn’t require jumping through a bunch of hoops.
I run both, and Windows is by far the most user friendly (ignoring Apple since they easily win the UI/UX competition). I didn’t have to spend hours getting my gpu to work with Windows or to install on a RAID configuration.
Linux is great if you want to control your system, but most people don’t want to fuck with it.
I didn’t have to spend hours getting my GPU to work on Linux… What were you using exactly, as a distro and as a GPU? Not that I try to invalidate your experience, but afaik, if you have a AMD or Intel GPU, it should work out of the box and if you have an Nvidia GPU, any user friendly Linux distro that is optionally made for gaming have drivers preinstalled and can easily be updated through a GUI or a two words command so that you can directly play as soon as you installed the distro.
programmer_humor
Top
This magazine is from a federated server and may be incomplete. Browse more on the original instance.