Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "succinct"
-
Someone on a C++ learning and help discord wanted to know why the following was causing issues.
char * get_some_data() {
char buffer[1000];
init_buffer(&buffer[0]);
return &buffer[0];
}
I told them they were returning a pointer to a stack allocated memory region. They were confused, didn't know what I was talking about.
I pointed them to two pretty decently written and succinct articles, the first about stack vs. heap, and the second describing the theory of ownership and lifetimes. I instructed to give them a read, and to try to understand them as best as possible, and to ping me with any questions. Then I promised to explain their exact issue.
Silence for maybe five minutes. They disregard the articles, post other code saying "maybe it's because of this...". I quickly pointed them back at their original code (the above) and said this is 100% an issue you're facing. "Have you read the articles?"
"Nope" they said, "I just skimmed through them, can you tell me what's wrong with my code?"
Someone else chimed in and said "you need to just use malloc()." In a C++ room, no less.
I said "@OtherGuy please don't blindly instruct people to allocate memory on the heap if they do not understand what the heap is. They need to understand the concepts and the problems before learning how C++ approaches the solution."
I was quickly PM'd by one of the server's mods and told that I was being unhelpful and that I needed to reconsider my tone.
Fuck this industry. I'm getting so sick of it.26 -
I just noticed programmers can cite Shakespeare in 1 character.
"To be or not to be..." = 2b|!2b = true = 17 -
Anyone ever run across some code that was so succinct and elegant, that you couldn't imagine ever doing something like that and start to feel bad?
<Look up who committed it>
Oh, well, damn... I used to be so good at this coding thing. -
I worked with a developer for months. He was senior to me; on more money than me and had way more experience. I spent at least 25% of my time explaining the most basic stuff to him. Things like 'no, that's not how a cache works', 'no, you shouldnt be doing string concatenation inside a loop', 'no you've completely written the wrong thing because you didn't listen'
When he left, he claimed to have finished off a feature for our application. We dove into it, rewrote it, made it more efficient, the code cleaner, the documentation more succinct and the logic more obvious. When I say we, I mean me and a student, and by me and a student, I mean the student with some very light prodding from me.4 -
Honestly, the most underrated skill in tech is communication. Writing clear, succinct emails and telling the story without rambling is a critical skill. If hiring comes down to a wire, I would hire a dev that can communicate well than someone with pure technical skill but zero communication skills.4
-
Observation rather than a rant.
Some of the best, most experienced devs I've ever had the pleasure of meeting and working with have invariably all been the most humble and least opinionated. Mention (x language that might commonly draw disdain) and you don't hear boos and hisses and jokes being thrown around, you hear considered, succinct observations about how, if they were to work with this language, there'd be various coding styles and rules that they'd suggest working to in order to avoid some common pitfalls and frustrations.
Mention a language or framework that they know little about, or heck, they know quite a *lot* about but in which they wouldn't consider themselves an expert, and they're the first to suggest drafting in help. They're more than happy to listen to bring themselves up to speed, even if that "outside help" comes from someone considerably younger and less experienced than them.
This has particularly come to mind as of late as I've found myself working with both ends of the spectrum, but it's been my experience for many years now. Have many others had the same experience?2 -
Why is it that virtually all new languages in the last 25 years or so have a C-like syntax?
- Java wanted to sort-of knock off C++.
- C# wanted to be Java but on Microsoft's proprietary stack instead of SUN's (now Oracle's).
- Several other languages such as Vala, Scala, Swift, etc. do only careful evolution, seemingly so as to not alienate the devs used to previous C-like languages.
- Not to speak of everyone's favourite enemy, JavaScript…
- Then there is ReasonML which is basically an alternate, more C-like, syntax for OCaml, and is then compiled to JavaScript.
Now we're slowly arriving at the meat of this rant: back when I started university, the first semester programming lecture used Scheme, and provided a fine introduction to (functional) programming. Scheme, like other variants of Lisp, is a fine language, very flexible, code is data, data is code, but you get somewhat lost in a sea of parentheses, probably worse than the C-like languages' salad of curly braces. But it was a refreshing change from the likes of C, C++, and Java in terms of approach.
But the real enlightenment came when I read through Okasaki's paper on purely functional data structures. The author uses Standard ML in the paper, and after the initial shock (because it's different than most everything else I had seen), and getting used to the notation, I loved the crisp clarity it brings with almost no ceremony at all!
After looking around a bit, I found that nobody seems to use SML anymore, but there are viable alternatives, depending on your taste:
- Pragmatic programmers can use OCaml, which has immutability by default, and tries to guide the programmer to a functional programming mindset, but can accommodate imperative constructs easily when necessary.
- F# was born as OCaml on .NET but has now evolved into its own great thing with many upsides and very few downsides; I recommend every C# developer should give it a try.
- Somewhat more extreme is Haskell, with its ideology of pure functions and lazy evaluation that makes introducing side effects, I/O, and other imperative constructs rather a pain in the arse, and not quite my piece of cake, but learning it can still help you be a better programmer in whatever language you use on a day-to-day basis.
Anyway, the point is that after working with several of these languages developed out of the original Meta Language, it baffles me how anyone can be happy being a curly-braces-language developer without craving something more succinct and to-the-point. Especially when it comes to JavaScript: all the above mentioned ML-like languages can be compiled to JavaScript, so developing directly in JavaScript should hardly be a necessity.
Obviously these curly-braces languages will still be needed for a long time coming, legacy systems and all—just look at COBOL—, but my point stands.7 -
An app that translates those dreaded error messages into succinct and human readable English, like: you missed a semi on line 23.8
-
We're hiring contract developers at my office. Just leafing though someone's CV before an interview and noticed it was 10 pages long! That's been a record so far but to be honest so many have been 4-6 pages long. What happened to keeping things succinct and relevant!?10
-
Why do we still speak in direct DNS?
I don't know about you, but I have observed so many DNS mishaps in my day, and also have observed that developers and non-devs consistently fail to have a succinct mental model of how to set DNS properly for a website.
There are lots of services that make setting DNS easier than ever, but I'm kind of surprised so many people still have to think directly in terms of CNAMES, APEX DOMAINS, and all the direct domain knowledge of DNS.
Can't we have a higher level abstraction that compiles to DNS with more safety guards? Sure, let me dip into DNS when I need to, but why are DNS settings tables still such a normal thing?
I write Ruby code so I don't have to write C code. I'm sure there are attempts in DNS abstraction, but the fact that I haven't come across them means they are probably still too leaky or just not mainstream.
Thoughts on the matter?4 -
Stop fucking wasting my time! When clients ask for something or how to do something and you set about providing a succinct and precise answer to their enquiry, then the second email comes saying, that’s not what I meant, and then a totally different unrelated enquiry follows as way of clarification. Just fuck off, your enquiry may now get answered in a week or just get completely ignored. Cunt. Think before you spew bollocks at me in an email.
-
This may be the most beautifully succinct service doc intro sentence I've ever written...
working on a shell library with the business logic for an Angular "white label" app workspace, and `ShellService` just got introduced as:
"this service serves to serve all other services.."
me thinks today is a good day for coding. 😎6 -
I have a dream
That one day
I will find a succinct explanation
To the meaning of and differences between
DAOs, Repositories and Services.