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 - "code styles"
-
So, you start with a PHP website.
Nah, no hating on PHP here, this is not about language design or performance or strict type systems...
This is about architecture.
No backend web framework, just "plain PHP".
Well, I can deal with that. As long as there is some consistency, I wouldn't even mind maintaining a PHP4 site with Y2K-era HTML4 and zero Javascript.
That sounds like fucking paradise to me right now. 😍
But no, of course it was updated to PHP7, using Laravel, and a main.js file was created. GREAT.... right? Yes. Sure. Totally cool. Gotta stay with the times. But there's still remnants of that ancient framework-less website underneath. So we enter an era of Laravel + Blade templates, with a little sprinkle of raw imported PHP files here and there.
Fine. Ancient PHP + Laravel + Blade + main.js + bootstrap.css. Whatever. I can still handle this. 🤨
But then the Frontend hipsters swoosh back their shawls, sip from their caramel lattes, and start whining: "We want React! We want SPA! No more BootstrapCSS, we're going to launch our own suite of SASS styles! IT'S BETTER".
OK, so we create REST endpoints, and the little monkeys who spend their time animating spinners to cover up all the XHR fuckups are satisfied. But they only care about the top most visited pages, so we ALSO need to keep our Blade templated HTML. We now have about 200 SPA/REST routes, and about 350 classic PHP/Blade pages.
So we enter the Era of Ancient PHP + Laravel + Blade + main.js + bootstrap.css + hipster.sass + REST + React + SPA 😑
Now the Backend grizzlies wake from their hibernation, growling: We have nearly 25 million lines of PHP! Monoliths are evil! Did you know Netflix uses microservices? If we break everything into tiny chunks of code, all our problems will be solved! Let's use DDD! Let's use messaging pipelines! Let's use caching! Let's use big data! Let's use search indexes!... Good right? Sure. Whatever.
OK, so we enter the Era of Ancient PHP + Laravel + Blade + main.js + bootstrap.css + hipster.sass + REST + React + SPA + Redis + RabbitMQ + Cassandra + Elastic 😫
Our monolith starts pooping out little microservices. Some polished pieces turn into pretty little gems... but the obese monolith keeps swelling as well, while simultaneously pooping out more and more little ugly turds at an ever faster rate.
Management rushes in: "Forget about frontend and microservices! We need a desktop app! We need mobile apps! I read in a magazine that the era of the web is over!"
OK, so we enter the Era of Ancient PHP + Laravel + Blade + main.js + bootstrap.css + hipster.sass + REST + GraphQL + React + SPA + Redis + RabbitMQ + Google pub/sub + Neo4J + Cassandra + Elastic + UWP + Android + iOS 😠
"Do you have a monolith or microservices" -- "Yes"
"Which database do you use" -- "Yes"
"Which API standard do you follow" -- "Yes"
"Do you use a CI/building service?" -- "Yes, 3"
"Which Laravel version do you use?" -- "Nine" -- "What, Laravel 9, that isn't even out yet?" -- "No, nine different versions, depends on the services"
"Besides PHP, do you use any Python, Ruby, NodeJS, C#, Golang, or Java?" -- "Not OR, AND. So that's a yes. And bash. Oh and Perl. Oh... and a bit of LUA I think?"
2% of pages are still served by raw, framework-less PHP.32 -
!rant
This was over a year ago now, but my first PR at my current job was +6,249/-1,545,334 loc. Here is how that happened... When I joined the company and saw the code I was supposed to work on I kind of freaked out. The project was set up in the most ass-backward way with some sort of bootstrap boilerplate sample app thing with its own build process inside a subfolder of the main angular project. The angular app used all the CSS, fonts, icons, etc. from the boilerplate app and referenced the assets directly. If you needed to make changes to the CSS, fonts, icons, etc you would need to cd into the boilerplate app directory, make the changes, run a Gulp build that compiled things there, then cd back to the main directory and run Grunt build (thats right, both grunt and gulp) that then built the angular app and referenced the compiled assets inside the boilerplate directory. One simple CSS change would take 2 minutes to test at minimum.
I told them I needed at least a week to overhaul the app before I felt like I could do any real work. Here were the horrors I found along the way.
- All compiled (unminified) assets (both CSS and JS) were committed to git, including vendor code such as jQuery and Bootstrap.
- All bower components were committed to git (ALL their source code, documentation, etc, not just the one dist/minified JS file we referenced).
- The Grunt build was set up by someone who had no idea what they were doing. Every SINGLE file or dependency that needed to be copied to the build folder was listed one by one in a HUGE config.json file instead of using pattern matching like `assets/images/*`.
- All the example code from the boilerplate and multiple jQuery spaghetti sample apps from the boilerplate were committed to git, as well as ALL the documentation too. There was literally a `git clone` of the boilerplate repo inside a folder in the app.
- There were two separate copies of Bootstrap 3 being compiled from source. One inside the boilerplate folder and one at the angular app level. They were both included on the page, so literally every single CSS rule was overridden by the second copy of bootstrap. Oh, and because bootstrap source was included and commited and built from source, the actual bootstrap source files had been edited by developers to change styles (instead of overriding them) so there was no replacing it with an OOTB minified version.
- It is an angular app but there were multiple jQuery libraries included and relied upon and used for actual in-app functionality behavior. And, beyond that, even though angular includes many native ways to do XHR requests (using $resource or $http), there were numerous places in the app where there were `XMLHttpRequest`s intermixed with angular code.
- There was no live reloading for local development, meaning if I wanted to make one CSS change I had to stop my server, run a build, start again (about 2 minutes total). They seemed to think this was fine.
- All this monstrosity was handled by a single massive Gruntfile that was over 2000loc. When all my hacking and slashing was done, I reduced this to ~140loc.
- There were developer's (I use that term loosely) *PERSONAL AWS ACCESS KEYS* hardcoded into the source code (remember, this is a web end app, so this was in every user's browser) in order to do file uploads. Of course when I checked in AWS, those keys had full admin access to absolutely everything in AWS.
- The entire unminified AWS Javascript SDK was included on the page and not used or referenced (~1.5mb)
- There was no error handling or reporting. An API error would just result in nothing happening on the front end, so the user would usually just click and click again, re-triggering the same error. There was also no error reporting software installed (NewRelic, Rollbar, etc) so we had no idea when our users encountered errors on the front end. The previous developers would literally guide users who were experiencing issues through opening their console in dev tools and have them screenshot the error and send it to them.
- I could go on and on...
This is why you hire a real front-end engineer to build your web app instead of the cheapest contractors you can find from Ukraine.19 -
We're using a ticket system at work that a local company wrote specifically for IT-support companies. It's missing so many (to us) essential features that they flat out ignored the feature requests for. I started dissecting their front-end code to find ways to get the site to do what we want and find a lot of ugly code.
Stuff like if(!confirm("blablabla") == false) and whole JavaScript libraries just to perform one task in one page that are loaded on every page you visit, complaining in the js console that they are loaded in the wrong order. It also uses a websocket on a completely arbitrary port making it impossible to work with it if you are on a restricted wifi. They flat out lie about their customers not wanting an offline app even though their communications platform on which they got asked this question once again got swarmed with big customers disagreeing as the mobile perofrmance and design of the mobile webpage is just atrocious.
So i dig farther and farthee adding all the features we want into a userscript with a beat little 'custom namespace' i make pretty good progress until i find a site that does asynchronous loading of its subpages all of a sudden. They never do that anywhere else. Injecting code into the overcomolicated jQuery mess that they call code is impossible to me, so i track changes via a mutationObserver (awesome stuff for userscripts, never heard of it before) and get that running too.
The userscript got such a volume of functions in such a short time that my boss even used it to demonstrate to them what we want and asked them why they couldn't do it in a reasonable timeframe.
All in all I'm pretty proud if the script, but i hate that software companies that write such a mess of code in different coding styles all over the place even get a foot into the door.
And that's just the code part: They very veeeery often just break stuff in updates that then require multiple hotfixes throughout the day after we complain about it. These errors even go so far to break functionality completely or just throw 500s in our face. It really gives you the impression that they are not testing that thing at all.
And the worst: They actively encourage their trainees to write as much code as possible to get paid more than their contract says, so of course they just break stuff all the time to write as much as possible.
Where did i get that information you ask? They state it on ther fucking career page!
We also have reverse proxy in front of that page that manages the HTTPS encryption and Let's Encrypt renewal. Guess what: They internally check if the certificate on the machine is valid and the system refuses to work if it isn't. How do you upload a certificate to the system you asked? You don't! You have to mail it to them for them to SSH into the system and install it manually. When will that be possible you ask? SOON™.
At least after a while i got them to just disable the 'feature'.
While we are at 'features' (sorry for the bad structure): They have this genius 'smart redirect' feature that is supposed to throw you right back where you were once you're done editing something. Brilliant idea, how do they do it? Using a callback libk like everyone else? Noooo. A serverside database entry that only gets correctly updated half of the time. So while multitasking in multiple tabs because the performance of that thing almost forces you to makes it a whole lot worse you are not protected from it if you don't. Example: you did work on ticket A and save that. You get redirected to ticket B you worked on this morning even though its fucking 5 o' clock in the evening. So of course you get confused over wherever you selected the right ticket to begin with. So you have to check that almost everytime.
Alright, rant over.
Let's see if i beed to make another one after their big 'all feature requests on hold, UI redesign, everything will be fixed and much better'-update.5 -
Wrote some code during the break that transform an image to the following styles, is it good enough to post on github?22
-
I was a little too harsh on a colleague today.
He asked to help him get something working... After looking at it for a bit, I asked: "I don't get it, what have you been doing all day? Yesterday we split this element into two separate divs, and it worked perfectly, now I've see you've moved all the styles back to the container and there's only one div. The easiest way to get this to work properly is to simply undo everything you've done today."
He looked at me with puppy eyes and I realized I was too harsh. He wasn't _trying_ to break everything, he just hadn't understood why we split the element into two divs. So I lowered my tone a bit, and explained everything again, from the start, then did it again together with him and made sure he understood the separation.
But I still feel bad for how I talked to him. It's not like I shouted or cursed or anything (and I curse a _lot_ when talking about code). It was just condescending as fuck, and belittling. As if I was mocking him for not being as experienced as I am.
I'll do better next time.8 -
Hey @Root! I know you won't have time to finish Ticket A before holiday vacation, so work on Ticket B instead.
I finished Ticket A in time. except for converting/fixing some horrible spaghetti monstrosity. More or less: "we overwrote this gem's middleware and now it calls back into our codebase under specific circumstances, and then calls the gem again, which calls the middleware again." Wtf? It's an atrocity against rationality.
The second day after vacation:
Hey @Root, drop Ticket B and work on Ticket C instead. Can you knock this out quick, like before friday? ... Uh, sure. It looks easy.
Ticket C was not easy. Ticket C was a frontend CSS job to add a print button, and for unknown reasons, none of the styles apply during printing. The only code involved is adding a button with a single line of javascript: `window.print()`, so why give it to the chick who hasn't been given a frontend ticket in over a year? Why not give it to the frontend guy who does this all day every day? Because "do it anyway," that's why.
And in somewhere between 13 (now 5) minutes and two hours from now, I'm going to have a 1:1 with my boss to discuss the week. Having finished almost all of Ticket A won't matter because it's not a "recent priority" -- despite it being a priority before, and a lot of work. I've made no progress on Ticket B due to interruptions (and a total and complete lack of caring because I'm burned out and quite literally can no longer care), and no progress on ticket C because... it's all horribly broken and therefore not quick. I assigned it to Mr. Frontend, which I'll probably get chewed out for.
So, my 1:1 with bossmang today is going to be awful. And the worst part of all: I'm out of rum! Which means sobriety in the face of adversity! :<
but like, wtf. Just give me a ticket and let me work on it until it's done. Stop changing the damn priorities every other freaking day!rant idk shifting priorities but why is all the rum gone? past accomplishments don't matter atrocity against rationality sobriety in the face of adversity16 -
Hello, I just want to let you know I'm working on a 15 year old product and it is currently in production.
It uses Angular.js and one of the earliest versions of React.js. I cannot use ES6, we don't have Babel, no JSX syntax, no CSS preprocessor. No webpack.
I must support browser since IE6 with an ES3 syntax. (luckily I got some some polyfills for an ES5 syntax)
When I build a component I have to call React.createClass and React.createElement.
The render() function is basically a nested pile of React.createElement.
There is no documentation for this product, no tests, no anything.
I had to reverse engineer it in order to understand how it works.
The code base uses mixed programming styles and naming conventions, plus thousands of little js files.
Oh and obviously no hot reload, every time I make a change I have to restart everything.
Please, send help.
I'm in danger.
Sincerely,
An underpaid developer
....
I'm not crying, you are crying...19 -
I'm editing the sidebar on one of our websites, and shuffling some entries. It involves moving some entries in/out of a dropdown and contextual sidebars, in/out of submenus, etc. It sounds a little tedious but overall pretty trivial, right?
This is day three.
I learned React+Redux from scratch (and rebuilt the latter for fun) in twice that long.
In my defense, I've been working on other tasks (see: Alerts), but mostly because I'd rather gouge my freaking eyes out than continue on this one.
Everything that could be wrong about this is. Everything that could be over-engineered is. Everything that could be written worse... can't, actually; it's awful.
Major grievances:
1) The sidebars (yes, there are several) are spread across a ridiculous number of folders. I stopped counting at 20.
2) Instead of icon fonts, this uses multiple images for entry states.
3) The image filenames don't match the menu entry names. at all. ("sb_gifts.png" -> orders); active filenames are e.g. "sb_giftsactive.png"
4) The actions don't match the menu entry names.
5) Menu state is handled within the root application controller, and doesn't use bools, but strings. (and these state flags never seem to get reset anywhere...)
6) These strings are used to construct the image filenames within the sidebar views/partials.
7) Sometimes access restrictions (employee, manager, etc.) are around the individual menu entries, sometimes they're around a partial include, meaning it's extremely difficult to determine which menu entries/sections/subsections are permission-locked without digging through everything.
8) Within different conditionals there are duplicate blocks markup, with duplicate includes, that end up render different partials/markup due to different state.
9) There are parent tags outside of includes, such as `<ul>#{render 'horrific-eye-stabbing'}</ul>`
10) The markup differs per location: sometimes it's a huge blob of non-semantic filthiness, sometimes it's a simple div+span. Example filth: section->p->a->(img,span) ... per menu entry.
11) In some places, the markup is broken, e.g. `<li><u>...</li></u>`
12) In other places, markup is used for layout adjustments, such as an single nested within several divs adorned with lots of styles/classes.
13) Per-device layouts are handled, not within separate views, but by conditionally enabling/disabling swaths of markup, e.g. (if is_cordova_session?).
14) `is_cordova_session` in particular is stored within a cookie that does not expire, and within your user session. disabling it is annoying and very non-obvious. It can get set whether or not you're using cordova.
15) There are virtually no stylesheets; almost everything is inline (but of course not actually everything), which makes for fun layout debugging.
16) Some of the markup (with inline styling, no less) is generated within a goddamn controller.
17) The markup does use css classes, but it's predominately not for actual styling: they're used to pick out elements within unit tests. An example class name: "hide-for-medium-down"; and no, I can't figure out what it means, even when looking at the tests that use it. There are no styles attached to that particular class.
18) The tests have not been updated for three years, and that last update was an rspec version bump.
19) Mixed tabs and spaces, with mixed indentation level (given spaces, it's sometimes 2, 4, 4, 5, or 6, and sometimes one of those levels consistently, plus an extra space thereafter.)
20) Intentional assignment within conditionals (`if var=possibly_nil_return_value()`)
21) hardcoded (and occasionally incorrect) values/urls.
... and last but not least:
22) Adding a new "menu sections unit" (I still haven't determined what the crap that means) requires changing two constants and writing a goddamn database migration.
I'm not even including minor annoyances like non-enclosed ternaries, poor naming conventions, commented out code, highly inefficient code, a 512-character regex (at least it's even, right?), etc.
just.
what the _fuck_
Who knew a sidebar could be so utterly convoluted?6 -
A nice word to all developers who say stuff like "I know I write bad code, but what does it matter.":
Please try to think in a logical way about what this part you are about to write has to do. It is much more difficult to rewrite code, the longer you wait after you started to code.
Bad code can have big impacts on different levels.
For example financially: Bad coding style or program structure can lead to thousands or much more in losses because of nasty bugs, bad performance, expandability or maintainability.
Think about quality over quantity.
A little example: I had to work together with other coders to meet a fucking tight deadline. The last day we coded like crazy and these dudes started to apply styling changes (CSS) directly as inline styles to the HTML code, instead of taking a few minutes more to find where in the CSS files they had to make the changes.
At the end of the deadline we had more stylingbugs than before. It took us another whopping 3 hours to fix what they had done.
So next time you code: Thinking before coding is mostly faster than just straightahead coding and fixing at the end. 😉2 -
I'm leaving my job.
That had already been decided when I learned that the only other front end guy at the company put in his two weeks notice. I immediately decided that I was morally obligated to put in my 4 months notice to give the company enough time to find a replacement (because, contrary to the beliefs of some programmers, front end plays a critical role in web dev).
With only 2 weeks left, I was put on his project to do some "simple design work".
Jesus christ in heaven alive and dead...
I've never in my career seen CSS with such an intense level of specificity -- nobody on that team should have ever let that code get so out of control.
I've spent the past week cursing, walking out of the room, whispering "I can't believe you've done this", ranting to non-developer friends.
Here's an example: the application has a panel used all over the place with a header and a body. Every Single View has it's own duplicated panel, each with its own unique class names and CSS. And that's just one element.
Every view has hundreds of lines of duplicated CSS. Every button, link, list, all with unique styles.
To any junior developer reading this, please hear me: Write one block of CSS for any element that will be reused. DO NOT duplicate your code when it can be used over and over.
/rant4 -
The guy where I can only shake my head when I see his code, and he is really proud of if implementations, while he
- doesn't care about warnings
- breaks builds and doesn't care
- doesn't care about code styles and indents in a very column based way
- adds tons of comments to his code, mostly hard to understand, and sometimes that much you can hardly find the code
- implements a tokenizer where you have to inherit from its interface (Why would I wanna implement whole functions for a tokenizer and not just use it in place where needed? How do I use two of those in one class?)
- implement a "generic" state machine base class with fixed lengths array of 3 events and 3 strings (Why would I need events and strings hardcoded in a "generic" state machine? Why a maximum of 3?)
- once delivered a software without the needed runtime components, so the whole system (embedded device) wasn't working properly and only by chance missed the point of disabling update mechanisms
- make your ears bleed about his big inventions whenever he sees you, no matter how often he already told you about that blazing new feature5 -
Okay guys, this is it!
Today was my final day at my current employer. I am on vacation next week, and will return to my previous employer on January the 2nd.
So I am going back to full time C/C++ coding on Linux. My machines will, once again, all have Gentoo Linux on them, while the servers run Debian. (Or Devuan if I can help it.)
----------------------------------------------------------------
So what have I learned in my 15 months stint as a C++ Qt5 developer on Windows 10 using Visual Studio 2017?
1. VS2017 is the best ever.
Although I am a Linux guy, I have owned all Visual C++/Studio versions since Visual C++ 6 (1999) - if only to use for cross-platform projects in a Windows VM.
2. I love Qt5, even on Windows!
And QtDesigner is a far better tool than I thought. On Linux I rarely had to design GUIs, so I was happily surprised.
3. GUI apps are always inferior to CLI.
Whenever a collegue of mine and me had worked on the same parts in the same libraries, and hit the inevitable merge conflict resolving session, we played a game: Who would push first? Him, with TortoiseGit and BeyondCompare? Or me, with MinTTY and kdiff3?
Surprise! I always won! 😁
4. Only shortly into Application Development for Windows with Visual Studio, I started to miss the fun it is to code on Linux for Linux.
No matter how much I like VS2017, I really miss Code::Blocks!
5. Big software suites (2,792 files) are interesting, but I prefer libraries and frameworks to work on.
----------------------------------------------------------------
For future reference, I'll answer a possible question I may have in the future about Windows 10: What did I use to mod/pimp it?
1. 7+ Taskbar Tweaker
https://rammichael.com/7-taskbar-tw...
2. AeroGlass
http://www.glass8.eu/
3. Classic Start (Now: Open-Shell-Menu)
https://github.com/Open-Shell/...
4. f.lux
https://justgetflux.com/
5. ImDisk
https://sourceforge.net/projects/...
6. Kate
Enhanced text editor I like a lot more than notepad++. Aaaand it has a "vim-mode". 👍
https://kate-editor.org/
7. kdiff3
Three way diff viewer, that can resolve most merge conflicts on its own. Its keyboard shortcuts (ctrl-1|2|3 ; ctrl-PgDn) let you fly through your files.
http://kdiff3.sourceforge.net/
8. Link Shell Extensions
Support hard links, symbolic links, junctions and much more right from the explorer via right-click-menu.
http://schinagl.priv.at/nt/...
9. Rainmeter
Neither as beautiful as Conky, nor as easy to configure or flexible. But it does its job.
https://www.rainmeter.net/
10 WinAeroTweaker
https://winaero.com/comment.php/...
Of course this wasn't everything. I also pimped Visual Studio quite heavily. Sam question from my future self: What did I do?
1 AStyle Extension
https://marketplace.visualstudio.com/...
2 Better Comments
Simple patche to make different comment styles look different. Like obsolete ones being showed striked through, or important ones in bold red and such stuff.
https://marketplace.visualstudio.com/...
3 CodeMaid
Open Source AddOn to clean up source code. Supports C#, C++, F#, VB, PHP, PowerShell, R, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript.
http://www.codemaid.net/
4 Atomineer Pro Documentation
Alright, it is commercial. But there is not another tool that can keep doxygen style comments updated. Without this, you have to do it by hand.
https://www.atomineerutils.com/
5 Highlight all occurrences of selected word++
Select a word, and all similar get highlighted. VS could do this on its own, but is restricted to keywords.
https://marketplace.visualstudio.com/...
6 Hot Commands for Visual Studio
https://marketplace.visualstudio.com/...
7 Viasfora
This ingenious invention colorizes brackets (aka "Rainbow brackets") and makes their inner space visible on demand. Very useful if you have to deal with complex flows.
https://viasfora.com/
8 VSColorOutput
Come on! 2018 and Visual Studio still outputs monochromatically?
http://mike-ward.net/vscoloroutput/
That's it, folks.
----------------------------------------------------------------
No matter how much fun it will be to do full time Linux C/C++ coding, and reverse engineering of WORM file systems and proprietary containers and databases, the thing I am most looking forward to is quite mundane: I can do what the fuck I want!
Being stuck in a project? No problem, any of my own projects is just a 'git clone' away. (Or fetch/pull more likely... 😜)
Here I am leaving a place where gitlab.com, github.com and sourceforge.net are blocked.
But I will also miss my collegues here. I know it.
Well, part of the game I guess?7 -
My current project is a fucking nightmare.
It started in 2007, using a solution developed by an Indian company due to outsourcing (aka low-quality code).
It's running on Java 7 on the back-end and its front-end side is pure Javascript files. There are thousands of little .js files everywhere, no documentation, no comments, differents coding styles, outdated API that were already outdated at the time, mixed oop and procedural.
Not even when I started coding, I wrote something so horrible.
Yo, it's a clusterfuck and I just wanna get drunk.5 -
Confession time.
I mix naming styles in my code. Some variables will be camelcase, some will have underscores, some will be all lowercase.
Classes are always title case though. Anything else is barbaric.undefined sorry not sorry it's a real problem some variables feel camelcasey some variables feel underscorey it's worse in javascript for some reason4 -
TLDR: Ever wondered what your project's intro/theme song would be?!
Here's mine..
https://youtu.be/SH8wDkqA_50
Share yours if you ever thought about it or some particular song plays in your head while reading this..
Long(er) version + story: project I am currently working on is notorios in our company.. everyone avoids it, parts of code are untouched for 10+ years.. I used to think it was a 'shitty' project, many frameworks, many parts, many coding styles, many bugs... but longer I worked on it, more I came to realisation, it's not the code, it was the coders.. sloppy coders who didn't give a flying f..
Yes, some things are outdated still, and could be rewritten better (hopefully it will start happening soon! Yay!!), some were already rewamped, new things added... but for the time it was going live, it was majestic. I love solving bugs n problems so I must admit it has grown on me.. my little baby/devil..
Anyhu, one day on skype out of the blue I got this pic from my coworker.. made my day, laughed my ass off.. later that day I was debbuging something and youtube started rolling saw theme song (https://youtu.be/9fwWS6Xo1go)...
When I realised what I was listening too, it made perfect sense.. I was relaxed, at peace.. it clicked.. the song, the project, the bug, the code.. it all made chaotic sense..
I want to play a game..
I realised, project wasn't mean, it was just misunderstood and mistreated.. it can be your best friend if you play nice.
I replied to said coworker that I rhink I just found out my project's theme song and pasted the link.. he laughed, I laughed, my project laughed then it killed my test server.. It was a great day!! 🤣🤣🤣🤣
// all true except the project killing server part, that in fact happened on a different occasion
So.. you guys had any moments like this? Any theme songs, intros for your projects?? Or am I the only weirdo who makes associations like this all the time... 🤔🤣😇 ???6 -
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 -
So I left this company I was working for for about 6 years and then eventually came back earlier this year. It was basically 2 backend devs, 2 frontend, and a designer, with me being one of the frontend devs, and the other operating as the owner/alpha of the group. And our coding styles couldn’t have been more different. I wrote code with purpose that could scale, while he wrote garbage that I affectionally labelled "brute force code"; meaning it eventually got the job done, but was always a complete nightmare to work with. Think the windiest piece of shit you’ve ever seen and then times it by 10. Edit the simplest thing at your peril. And if you think you fixed something, all you’ve ever really done is create another 10 problems. And because the code was such shit, it relied on certain things to be broken in order for other things to work. Anyway, you get the drift.
In the beginning we used jQuery and so we just continued to use it throughout the years. But then when I finally left I realized we were operating in a bit of a bubble, where we didn’t really care much to ever try anything else, and mostly because we were arrogant. But eventually my boss started to notice the trend of moving away from jQuery, so he converted everything to vanilla JavaScript. Thing is, he hadn’t learned ES6 yet or any of the other tools that came along with it. And so it was a mess, and I was quite shocked at how many lengths he’d gone to create the full conversion. Granted, it was faster. But overall, still a nightmare to work with, as the files were still thousands of lines long. And when I dug deeper, I realized that he’d started to pluck things out of the DOM manually on-demand. And so it dawned on me: he’d been looking at sites built with React and other dif-engines, and then instead of just using one, he decided to reinvent the wheel. And the funny thing is, he thought it was just a matter of always replacing the entire HTML for whatever was needed. And so he thought what he was doing was somehow clever. And why not? He’s a badass mathematician who created an empire with jQuery. And so he obviously didn’t need input from anyone, and especially not from the shitty devs over there at Facebook. Anyway, while I was gone I learned quite a bit of React, and so it was just comical to me when I came back and saw this. Because it would have been a million times more efficient had he just used the proper tool. In short, he’d re-written the entire codebase for two full years and then ended up with another round of brute-force garbage.
So that’s my story. The lesson is, when you work for someone who’s a dumbass piece of shit, sometimes he’ll be so stupid the only recourse is uncontrollable laughter. I became a digital nomad somewhere in between and fucked off to Asia where I barely worked for 2 years. And I’d definitely recommend the same for anyone else with an asshole boss where the work is unfulfilling. Because it doesn’t matter what your job is when you’re living like a millionaire in Asia working 15 hours a week.4 -
I have code convention OCD.
My team really fucked up the code with their different indentation styles, and it really makes me want to kill them!! 😡😡😠3 -
I don't seem to understand why so many developers nowadays are focused on learning newer frameworks rather than focusing on best practices and learning how to code better.
"Hey I learnt React today, we should totally switch to it because it's so amazing"
> mfw the same guy doesn't even know how to follow coding styles, write good code that scales or document his code.
I think some people need to take a step back and focus on the more vital tasks of writing good code to begin with rather than getting so excited about every new thing that surfaces. It's annoying as fuck to deal with some of these people who you have to work alongside and be able to read their loopy shit code and all they are doing in their time is refreshing hackernews.8 -
I think I might change my middle name to "I told you so"
Couple of weeks ago I proposed integrating a daily process job into an existing WPF application (details of what+why would be too long to explain) and the manager suggested I make the changes
Me: "I can do it, but Jay has the most experience with that application. I don't have his WPF skills"
Mgr: "How hard can WPF be? If it uses the MVVM pattern, it should be a snap."
Me: "Its nearly an 8 year old WPF project with several chefs in that kitchen. I pretty sure I could figure it out, but that is a difference between 2 weeks and 2 days. Integration is pretty straight forward, Jay could probably do it in a day."
DevA: "WPF is easy. MVVM makes it even easier. I worked on the shipping app."
Me: "That's was a brand new, single page app, but yea, it should be easy."
DevB: "WPF has been around a long time and the tools have really matured. I don't understand what is so difficult."
Me: "I didn't say anything would be difficult, I know with that application, there is going to be complexity we need to figure out."
DevB: "It uses the MVVM, so all we need is the user control, a view model, controller, and its done."
DevA: "Sounds easy to me."
Mgr: "If you need more time to work on the vendor project, I'll have DevB work on the integration."
<yesterday>
Me: "How is the integration going?"
DevB: "This app is a mess. I have no idea how they got the control collections to work. If I hard-code everything, I can get it to work. This dynamic stuff is so confusing. Then there is the styling. Its uses dark mode, but no matter what I do, my controls show up in light mode."
Me: "The app uses Prism, so the control configuration is in, or around, the startup code."
DevB: "That makes sense. Will it fix the styling too?"
Me: "I have no idea. When I looked at it, some controls loaded the styles from the main resource, other's have it hard-coded. Different chefs in the kitchen, I guess. How far have you got?"
DevB: "I've created invoice button. That is as far as I got"
Me: "I'm finished with the vendor project and I'll be wrapping up the documentation today. I can try to help next week."
DevB: "Thanks. I think we might have to get Jay to help if we can't figure this out."
Me: "Good idea"
Two weeks and only a button. A button? I miss Delphi.3 -
Last week: Resigned from my current job as a front end dev, mostly due to incompetence in upper middle management.
Yesterday: knowledge transfer to backend dev who aspires to become full stack.
"
- So how does the designer deliver the CSS to the code ?
- He doesn't, he just sends the prototype, we make it work...
- The manager told me that the front end team did not touch CSS.
*fuzzy find ". styles"*
- So these are the 40 some files that appeared here magically.'
"
Today:
New git flow policy's in place. Pull requests are now outside the flow and are entirely optional.
This is gonna be the tits... -
I just finished designing an entire asset management pipeline and christ on a fucking pogo stick, if it isn't convoluted.
Theres a lot of game engines out there, but all of them do it a little different. They all tackle a slightly different problem, without even realizing it.
1. asset management
2. asset change management
3. behavior change management
4. data management
5. combinatorial design management.
6. Combinatorial Behavior management
7. Feature completion
ASSET MANAGEMENT is exactly what it says on the tin.
ASSET CHANGE management can be thought of handling the import, export, formatting, platform specific packing, and versioning (including forking) of an asset.
BEHAVIORAL CHANGE management is a subset of asset management, because code is a subset of assets (depending on how you define 'assets'). The oldest known example of this is commenting and uncommenting code.
Or worse, printf debugging.
This can be file versioning, basic undo services, graph management of forks and mergers, toggles for features or modules, etc.
DATA management is about anything that doesn't fall into the other categories, everything from mission text to npc dialogues, quests, location names, item stats, the works. Anything you'd be tempted to put in a database, falls under this category. Haven't yet seen many engines offer this as an explicit built in tool as of yet, because the other problems are non-trivial as is, so this is a bit of low hanging fruit that gets handled by external tools, or loaded from formats as simple as json.
COMBINATORIAL DESIGN management is the idea of prefabbing, blueprints of broader object design using nested prototypes of existing game objects, to create more complex, reusable set pieces. Unity did this well. GM does this in part.
COMBINATORIAL BEHAVIOR management is entity-component systems, plus tooling to make it easy to add, remove, and configure components and their values on entity blueprints, also not uncommon. Both stencyl and unity do this. GM has a precursor to this in the form of configurable fields, but these fields are not based on component scripts attached to objects.
FEATURE COMPLETION is that set of gameplay mechanics or styles of design that an engine naturally makes easier to include or build in a game.
I don't think I'm aiming for all that, but I think at minimum a good engine has to do asset management, behavioral change management, prefabs, and entity-component systems with management tools for that. And ideally, asset change management.8 -
As I already said on devrant, I'm a freelance web developer and I also often sell my services for teaching, loving that. Currently I'm teaching PHP with 30 students and it's going very well.
But yesterday, I received an offer for giving another course next month, this time on HTML and CSS, for a company I don't know yet. Almost every line of this email is wrong, outdated by 20 years, or just basically meaningless...
So I thought I could do my best to translate this as close as possible to the original, preserving the wrong formulations too, just for you devranters fellas.
"Hello,
I have an offer for a 2 days course for 5 people (level 1+ and/or 2), on HTML5 and CSS3. Below, the program :
1. XHTML AND CSS2 INTRODUCTION
Advantages and benefits of change
Understanding compatibility for different versions of browsers
HTML, XHTML, CSS edition tools : presentation of the different tools
The CSS language : different types of selectors : class of selector, identifier of selector, contextual selectors, grouped selectors
Blocks of text, boxes of text
The CSS1, CSSP, CSS2 properties
Relative and absolute measures units
2. LAYOUT TECHNIQUES
Full CSS, XHTML websites demo
Positioning with the position property, positioning with the float property
Columns creation
Layout for forms
Layout for data tables
Layout for menus
3. INTRODUCTION TO SVG (SCALABLE VECTOR GRAPHICS)
Role and importance of SVG
Using SVG on client side : basic shapes
SVG structure of document, tags examples
Using CSS styles with SVG
Different integration methods for SVG in a XHTML document
4. OPTIMISATION OF JAVASCRIPT CODE
Introduction to DOM and Javascript
Access to document objects : different access techniques, using this keyword, create elements dynamically
Positioning elements with the help of Javascript : positionning elements relatively to the mouse, move elements
Show/hide elements for creating hierarchical menus
Code optimisation techniques : using objects, objects litterals, loops optimisation
Can you please give me your availability ?"
Seriously...
CSS-fucking-1 ! Is it a course for dinosaurs ?
...And if only my rant was just about the program...
It's totally impossible to cover all these subjects in only 2 days with people of different levels and experience.
The guy exactly said to me : "don't worry about the program, it's an old text but they agreed to it anyway. They just want to learn HTML and CSS, some of them already know it but want to learn more, and the others are total beginers.".
And here is the meaning for the "(level 1+ and/or 2)" part in the email.
So... Surprizingly, I accepted the offer, but asked for at least a 3rd day. I'm waiting for their answer, but I'll do it anyway, adapting the course content to the actual students knowledge. I need the money, after all.
Wish me luck...
It's just sad that these formation companies are selling bullshit to clients that just want to learn something useful. It's too often like that, they sell shitty/useless programs and we have to catch up in real time with students that don't understand why they don't learn what was told to them.3 -
I continue to internally read and study about Smalltalk in an effort to see where we might have FUCKED UP and went backwards in terms of software engineering since I do not believe that complex source code based languages are the solution.
So I have Pharo. Nothin to complex really, everything is an object, yet, you do have room for building DSL's inside of it over a simple object model with no issue, the system browser can be opened across multiple screens (morph windows inside of a smalltalk system) for which you can edit you code in composable blocks with no issues. Blocks being a particular part of the language (think Ruby in more modern features) give ample room for functional programming. Thus far we have FP and OO (the original mind you) styles out in the open for development.
Your main code can be executed and instantly ALTER the live environment of a program as it is running, if what you are trying to do is stupid it won't affect the live instance, live programming is ahead of its time, and impressive, considering how old Smalltalk is. GUI applications can be given headless (this is also old in terms of how this shit was first distributed) So I can go ahead and package the virtual machine with the entire application into a folder, and distribute it agains't an organization "but why!!!! that package is 80+ mbs!") yeah cuz it carries the entire virtual machine, but go ahead and give it to the Mac user, or the Linux user, it will run, natively once it is clicked.
Server side applications run in similar fashion to php, in terms of lifecycles of request and how session storage is handled, this to me is interesting, no additional runtimes, drop it on a server, configure it properly and off you go, but this is common on other languages so really not that much of a point.
BUT if over a network a user is using your application and you change it and send that change over the network then the the change is damn near instant and fault tolerant due to the nature of the language.
Honestly, I don't know what went wrong or why we are not bringing this shit to the masses, the language was built for fucking kids, it was the first "y'all too stupid to get it, so here is simple" engine and we still said "nah fuck it, unlimited file system based programs, horrible build engines and {}; all over the place"
I am now writing a large budget managing application in Pharo Smalltalk which I want to go ahead and put to test soon at my institution. I do not have any issues thus far, other than my documentation help is literally "read the source code of the package system" which is easy as shit since it is already included inside. My scripts are small, my class hierarchies cover on themselves AND testing is part of the system. I honestly see no faults other than "well....fuck you I like opening vim and editing 300000000 files"
And honestly that is fine, my questions are: why is a paradigm that fits procedural, functional and OBVIOUSLY OO while including an all encompassing IDE NOT more famous, SELECTION is fine and other languages are a better fit, but why is such environment not more famous?9 -
Sometime in the mid to late 1980's my brother and I cut our teeth on a Commodore 64 with Basic. We had the tape drive, 1541 Disk Drives, and the main unit and a lot of C64 centric magazines my dad subscribed to. Each one of the magazines had a snippet of code in a series so that once you had 6 volumes of the magazine, you had a full free game that you got to write by yourself. We decided to write a Hangman game. Since we were the programmers, we already knew all the possible words stored in the wordlist, so it got old quick. One thing that hasn't changed is that my brother had the tenacity and mettle for the intensive logic based parts of the code and I was in it for the colors and graphics. Although we went through some awkward years and many different styles and trends, both of us graduated with computer science degrees at Arkansas State University. Funny thing is, I kept making graphics, CSS, UI, front end, and pretty stuff, and he's still the guy behind the scenes on the heavy lifting and logical stuff. Not that either of us are slacks on the opposite ends of our skilsets, but it's fun to have someone that compliments your work with a deeper understanding. I guess for me it was 2009 when I turned on the full time DEV switch after we published our first website together. It's been through many iterations and is unfortunately a Wordpress site now, but we've been selling BBQ sauce online since 2009 at http://jimquessenberry.com. This wasn't my first website, but it's the first one that's seen moderate success that someone else didn't pay the bill for. I guess you could say that our Commodore 64 Hangman game, and our VBASIC game The Big Giant Head for 386 finally ended up as a polished website for selling our Dad's world class products.1
-
Here comes lots of random pieces of advice...
Ain't no shortcuts.
Be prepared, becoming a good programmer (there are lots of shitty programmers, not so many good ones) takes lots of pain, frustration, and failure. It's going to suck for awhile. There will be false starts. At some point you will question whether you are cut out for it or not. Embrace the struggle -- if you aren't failing, you aren't learning.
Remember that in 2021 being a programmer is just as much (maybe even moreso) about picking up new things on the fly as it is about your crystalized knowledge. I don't want someone who has all the core features of some language memorized, I want someone who can learn new things quickly. Everything is open book all the time. I have to look up pretty basic stuff all the time, it's just that it takes me like twelve seconds to look it up and digest it.
Build, build, build, build, build. At least while you are learning, you should always be working on a project. Don't worry about how big the project is, small is fine.
Remember that programming is a tool, not the end goal in and of itself. Nobody gives a shit how good a carpenter is at using some specialized saw, they care about what the carpenter can build with that specialized saw.
Plan your build. This is a VERY important part of the process that newer devs/programmers like to skip. You are always free to change the plan, but you should have a plan going on. Don't store your plan in your head. If you plan exists only in your head you are doing it wrong. Write that shit down! If you create a solid development process, the cognitive overhead for any project goes way down.
Don't fall into the trap of comparing yourself to others, especially to the experts you are learning from. They are good because they have done the thing that you are struggling with at least a thousand times.
Don't fall into the trap of comparing yourself today to yourself yesterday. This will make it seem like you haven't learned anything and aren't on the move. Compare yourself to yourself last week, last month, last year.
Have experienced programmers review your code. Don't be afraid to ask, most of us really really enjoy this (if it makes you feel any better about the "inconvenience", it will take a mid-level waaaaay less time to review your code that it took for you to write it, and a senior dev even less time than that). You will hate it, it will suck having someone seem like they are just ripping your code apart, but it will make you so much better so much faster than just relying on your own internal knowledge.
When you start to be able to put the pieces together, stay humble. I've seen countless devs with a year of experience start to get a big head and talk like they know shit. Don't keep your mouth closed, but as a newer dev if you are talking noise instead of asking questions there is no way I will think you are ready to have the Jr./Associate/Whatever removed from your title.
Don't ever. Ever. Ever. Criticize someone else's preferred tools. Tooling is so far down the list of what makes a good programmer. This is another thing newer devs have a tendency to do, thinking that their tool chain is the only way to do it. Definitely recommend to people alternatives to check out. A senior dev using Notepad++, a terminal window, and a compiler from 1977 is probably better than you are with the newest shiniest IDE.
Don't be a dick about terminology/vocabulary. Different words mean different things to different people in different organizations. If what you call GNU/Linux somebody else just calls Linux, let it go man! You understand what they mean, and if you don't it's your job to figure out what they mean, not tell them the right way to say it.
One analogy I like to make is that becoming a programmer is a lot like becoming a chef. You don't become a chef by following recipes (i.e. just following tutorials and walk-throughs). You become a chef by learning about different ingredients, learning about different cooking techniques, learning about different styles of cuisine, and (this is the important part), learning how to put together ingredients, techniques, and cuisines in ways that no one has ever showed you about before. -
Software Engineer
Nerdious Geekius
The elusive Software Engineer is a nocturnal creature, rarely found at their desks before 10 or 11 in the morning, but often staying late into the night. They dislike being interrupted while at work, and it theorized that their penchant for twilight hours is an evolutionary adaptation to reduce breaks in their trance like state of coding.
Not surprisingly, Software Engineers are solitary creatures, except for occasional gatherings called "code reviews". In these gatherings, engineers gently pace around a clearing, sizing up each others work. Although occasional battles will erupt, they mostly end without injury and the engineer will retreat to their desk and continue to hibernate.
Fun Fact: Software Engineers have been know to kill each other in brutal fights over identation styles -
Ban visual programming programs, like scratch after the fist month introduce them to enhanced Google search strings and let them code on the command line going from imperative, over functional to object oriented programming styles using languages suited for the current style. Not like using Java from the get go. I hated it, waiting until everyone got to the point where they kind of understood the logic but failed at using correct syntax and efficient coding styles.
-
I'm shitting there hammering out some code butchering some real problems when I suddenly realise I'm surrounded. I look around and yes it's the bloody committee.
The committee is what I call the rest of the department and it is dominated by the old guard which comprises of the programmers that have been around for longer.
None of the old guard can program particularly well but because they had been around the longest they'd all grown senior. The committee had free reign but anyone else doing anything differently has to get approval from the committee.
The only way to code otherwise was to copy and paste existing code then to primarily rename things. If anyone did anything that hadn't been seen before then it would have to be approved by the committee. Individual action was not permitted unless you were old guard.
I swept my headphones away expecting it to be something unimportant. It was.
First things first they announce. We're going to add extraneous commas to the last element of all possible lists separated by comma including parameters or so they say. Ask but why so I do.
Because the language now supports it. They added support for it so it must be the right way someone proclaimed. Does it? I didn't realise we were waiting for it. Why do we want it though?
Didn't you hear? It's all over the blogosphere. It massively improves merge requests. But how I ask?
Five minutes later I grow tired of the chin stroking, elbow harnessing, slanted gazes into the yonder and occasionally hearing maybe its because and ask if they mean when you for example add an element the last element registers as changed from adding a comma. Turns out that's all it is.
How often do we see that tiny distraction and isn't it pointless to make the code ugly just for a tiny transient reduction in diff noise I ask. Everyone's stumped. This went on and on and got worse and worse. But it makes moving things around easy half of them say in unison like the bunch of slobs that they are. I mean really. It doesn't make expanding and contracting statements from multiline to single line easy and it's such a stupid thing. Is that all they do all day? Move multi-line method parameters up and down all day? If their coding conventions weren't totally whack they wouldn't have so many multiline method prototypes with stupid amounts of parameters with stupidly long types and names. They all use the same smart IDE which can also surely handle fixing the last comma and why is that even a concern given all the other outrageously verbose and excessive conventions for readability?
But you know what, who cares, fine, whatever. Lets put commas all over the shop and then we can all go to the pub and woo the ladies with how cool and trendy we are up to date with all the latest trends and fashions then we go home with ten babes hanging off each arm and get so laid we have to take a sick day the following to go to the STD clinic. Make way for we are conformists.
But then someone had to do it. They had to bring up PSR. Yes, another braindead committee that produces stupid decisions. Should brackets be same line or next line, I know, lets do both they decided. Now we have to do PSR and aren't allowed to use sensible conventions.
But why, I ask after explaining it's actually quite useful as a set of documents we can plagiarise as a starting point but then modify but no, we have to do exactly what PSR says. We're all too stupid apparently you see. Apparently we're not on their level. We're mere mortals. The reason or so I'm told, is so that anyone can come in and is they know PSR coding styles be able to read and write the code. That's not how it works. If you can't adjust to a different style, a more consistent style, that's not massively bizarre or atypical but rather with only minor differences from standard styles, you're useless. That's not even an argument, it's a confession that you've got a lump of coal where your brain's supposed to be.
Through all of this I don't really care because I long ago just made my own code generators or transpilers that work two ways and switch things between my shit and their shit but share my wisdom anyway because I'm a greedy scumbag like that.
Where the shit really hit the fan is that I pointed out that PSR style guide doesn't answer all questions nor covers all cases so what do we do then. If it's not in PSR? Then we're fucked.4 -
OH MY FUCKING GOD. I HATE
H A T E
ACQUIA SITE STUDIO.
"Let's make a low-code 'solution' for developers who barely can stand working on Drupal as it is, and make the completely easy and perfect process of styling a website, COMPLETELY UNBEARABLE!"
Yea this is a great idea, experienced developers can now spend hours trying to fucking find where a single style is coming from. Oh it was too easy to cmd+f a stylesheet or a codebase to find something particular? Yea FUCK THAT. Lets turn EVERY SINGLE STYLE into a unsearchable .yml file where every style definition is now a machine hash. WAY easier to use. Isn't it so cool to fucking click on styles from a dropdown where they come off the edge of the screen. FUCK whichever stupid fuck came up with this dog shit nonsense. I fucking HATE this soul crushing work.2 -
markdown is not good enough! the tools aren't there for non-devs and there's no concordance on moving forward *compatibly* for anything other than headers and __possibly__ lists.
md has been around for years and still no consensus on comments, meta data, css, data imports, etc.
i could never in good faith recommend to a non-dev to use markdown, even though every academic and professional writer from legal to journalism should exclusively be using markdown to write and store their documents. the data portability and ease of search, retrieval, collection, distribution, etc of markdown compared to pdf or docx is enormous. markdown is the hex format of text, the perfect layer of data and visual so that the user and the computer can both operate on text as blocks of data rather than weirdly styled paragraphs that need to be reformatted BY HAND for citation-style or journal format, or paper size. FOR EACH SUBMISSION. Academics literally rewrite their 100-page papers to accommodate up to 10 different submission requirements.
They could be clicking MLA vs Chicago and/or using a journal's stylesheet to recompile for its styles.
Today there is some support from zotero et al to take away some of the pain, but it makes ZERO SENSE for writers to have to keep and store and keep up to date, multiple versions of the same document. Git pull does not exist for them. But the worst part is that git isnt the solution to their problem. They need a compiler more than they need version control. But they also desperately need vcs. They ALL literally have a million files named "dumdum.dumFINAL-3084_lastversion \2020, this one.dum".
They dont have git or anything like it, because they need a line-by-line solution like markdown for git to become effective.
All of writing is basically mired in the fact that people cant even roll up their paragraphs and see what the fuck it is theyre saying. Most writing reads like a long scroll through some nonsense that goes nowhere. Like this rant. but the point is that markdown and line-by line editing actually produces more logically sound writing. You start to think in terms of defining ideas in blocks, ... like code.9 -
<!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’m working on a react codebase and company decided to add a new module.
Now im writing markup and css to ensure UX is smooth as designers thought of it.
Imagine my horror when I start to code and find out no matter what HTML tag i use, it’s been FUCKING OVERRIDDEN in the global stylesheet. AND STYLES HAVE BEEN OVERRIDDEN WITH !important
They’re also using Ant design as a component library. Guess what, default ant design classes have been overridden too. So i try to use ant design button or card, and bam, MAGICALLY SOME DESIGN FROM SOME SHITHOLE MODULE DECIDES TO FUCK WITH MY STYLES
On top of that, styles of parts of application has been written in SASS, some part of application uses bootstrap components some use third party components like tables and responsive grids to suit to their preferences. Some parts use handwritten css. Some parts use CSS IN JS and styled components. THE FUCK IS THIS GARBAGE!!!! THE FUCKING CODEBASE HAS A MIND OF ITS OWN!!!!!! YOU NAME A WAY TO ADD STYLES TO A COMPONENT, ITS THERE!!!
And the company’s management thought a “fractal” approach to maintain each individual view is “best” for SCALABILITY!!! HOW THE FUCK DID IT NOT CROSS YOUR DUMB MIND THAT FRACTAL APPROACH ALSO GUIDES TO HAVE ALL COMMON STUFF AT ONE PLACE!!!! THIS CODEBASE HAS DUPLICATE STYLES AND DUPLICATE CODE IN ALMOST EVERY MODULE!!!!
Not to mention every developer choosing to freely decide the way they should write their code without any guidelines.
HOW THE FUCK PEOPLE WRITE THEIR CODE WITHOUT THINKING ABOUT OTHER DEVS!!! SO BASICALLY I AM NOT ONLY CLEANING SOMEONE ELSE’S SHIT BUT ALSO TRY NOT TO SHIT IN THE PROCESS!! FML2 -
I'm starting to get sick of working with handed over projects that previous devs think they are masters of programming and their code is nothing but pure chaos ....
I'm given a project written in Java & Swift, API class is initiated a million times in same view, has access to android context, custom font is applied by creating custom text view instead of applying customization in styles file ....
Still haven't yet looked into iOS code but I'm not expecting much ...
Sometimes I wonder why I chose working with code4 -
Transferring our website from (outdated) SAPUI5 to VueJS.
It's so painful to look at 6 years old code... And at least 10 different coding styles.3 -
Fuck you Android ! Why the fuck does making my fucking status bar transparent has to be more difficult than launching a mars mission with a team of chimpanzees. I have been trying everything from xml styles to fucking java code but the status bar won't take the tint. Been at this fucking shit for 2 days3
-
A former team lead decided the team should review any open PR before proceeding with their own tasks after their breaks. Any open PR also meant reviewing refinements in an ongoing discussion. Several times, we wasted time for review, coding, and discussing when the second reviewer asked to revert the changes introduced according to the requests of the first reviewer.
Now as a freelancer, in smaller projects, I sometimes have no coworkers to review my code. So, apart from testing, I try to pay more attention to linters, static code analysis and automated coding assistance. I have stylelint, eslint, SonarLint, and possibly some more IDE inspections. For the infamous popular blogging software, I also have a so-called PHP code sniffer that checks all PHP and JavaScript code for compliance with the WordPress coding styles, so finally, I got the team experience back: SonarLint suggests removing unnecessary spaces and reformating my code, which in turn makes PHPCS complain that the code violates the legacy code style. -
TL;DR - Coding standards are a shit practice IMO.
What we don't talk about enough among software engineers, is the artistic aspect of the craft of writing code.
For example, consider your client saying this to you.
"Build me a web app where a user will login. They will have a wallet to purchase subscriptions of 3 products of different prices."
Give these two statements to say, 10 devs and see how each of them will come up with their own vision of the problem and how they would implement it in their own ways.
So now you are working on a big team with say 30 people and you have a big project to work on. Different members of the team bring different styles of code to you to review and if, the Team Leader is as incompetent as mine is, they would find it troubling to understand the pull requests.
So what do you do in these scenarios? Implement Coding standards !!! They take away the artistic vision of the devs and tries to force them to follow rules like sheep.
Also the company doesn't give two shits about the code standards cuz, as long as they have working code that makes them money, they wouldn't care how the code is written.
Thoughts ?8 -
So we have duplicate code because dumb devs thinks Bootstrap (4) is kick-ass for mobile. 😒 Can't do jack with their tables.
I told them to use Flexbox instead. Bootstrap (even 4) is antiquated and there's better options.
My recommendation is to use Flexbox Grid with React to build a modular living style guide with built in unit testing for styles and interactions.
Basically got told that my opinion is just an opinion and is the same as using Bootstrap. 😭
Anyone have some solid "facts" on Bootstrap I can use in the long run? We haven't even launched anything and we're already in technical debt because of this stupid framework decision. Someone please help. 😞3 -
Doing a code review (Of code written by another person...different code styles and weird methods can really get you a gray hair or two :D)2
-
Long time nothing from Mr. Gitmaster, somehow made my peace with him as the project moved out of my focus and he actually seemed to be contributing.
But now some pull request exchanges burst into flames as if they were on LKLM before Linus got castrated. Actually it's with the guy who is jamming out most of the front end code trying to make a really shiny UI with lots of animations that turn our macs into heaters.
Well, debate was over JS code styles or lack thereof and how commented out code should be removed (would actually support Mr gitmaster here). They have me a bit lost there, as I expect the freestyle JS code we produce without any agreed Coding Style Guideline to be an even greater clusterfuck than our C++ code base.
Anyway, hope they come to terms again, like at the start of the project when they jokingly attributed one another as assholes. Their opposing characters could actually benefit from each other. -
Avoid Jetbrains products if you value your sanity.
For the last several months, my settings and stored database credentials are wiped out at random. Meaning code styles, indention settings, keymaps, database settings, plugins, local change history, cache, all of it are reset to factory default at random, costing me hours trying to restore it all.
I've updated and it is still happening.
The moral of the lesson is to not pay for dev tools, lest you become reliant on them. You definitely don't get what you're paying for anymore.11 -
Got a guy trying to convince bosses of enforcing ESlint rules or whatever
This is the same guy that came into our repository forcing this shit on every single file he touched, when we had a different, established style
I shouldn't have let his new style enforced by ESlint defaults pass the first time in code review
Like, WHY the fuck do you want to be the enforcer of styles when you started shitting on what was there in the first place
Jesus fucking Christ5 -
I only prefer { on same lines if not used for class constructors & try catch blocks..
Other than that, I adapt to the existing codebase styles, to not fuck up things further, even if it makes no effing sense (old project, styles & best practises changed 'a bit')..
So I guess I'm being influenced most by the old code and pass devs on the projects..1 -
Since when was having 3 spinner styles and 2 pop ups styles a good idea in a SaaS? This baby needs a proper spruce up. I must admit it's not really a rant, I enjoy it, decrapifying the code and general refactoring. This is from a hackathon a good couple of years ago. Finally giving it some TLC. Feels amazing.
-
[CONCEITED RANT]
I'm frustrated than I'm better tha 99% programmers I ever worked with.
Yes, it might sound so conceited.
I Work mainly with C#/.NET Ecosystem as fullstack dev (so also sql, backend, frontend etc), but I'm also forced to use that abhorrent horror that is js and angular.
I write readable code, I write easy code that works and rarely, RARELY causes any problem, The only fancy stuff I do is using new language features that come up with new C# versions, that in latest version were mostly syntactic sugar to make code shorter/more readable/easier.
People I have ever worked with (lot of) mostly try to overdo, overengineer, overcomplicate code, subdivide into methods when not needed fragmenting code and putting tons of variables.
People only needed me to explain my code when the codebase was huge (200K+ lines mostly written by me) of big so they don't have to spend hours to understand what's going on, or, if the customer requested a new technology to explain such new technology so they don't have to study it (which is perfectly understandable). (for example it happened that I was forced to use Devexpress package because they wanted to port a huge application from .NET 4.5 to .NET 8 and rewriting the whole devexpress logic had a HUGE impact on costs so I explained thoroughly and supported during developement because they didn't knew devexpress).
I don't write genius code or clevel tricks and patterns. My code works, doesn't create memory leaks or slowness and mostly works when doing unit tests at first run. Of course I also put bugs and everything, but that's part of the process.
THe point is that other people makes unreadable code, and when they pass code around you hear rising chaos, people cursing "WTF this even means, why he put that here, what the heck this is even supposed to do", you got the drill. And this happens when I read everyone code too.
But it doesn't happens the opposite. My code is often readable because I do code triple backflips only on personal projects because I don't have to explain anyone and I can learn new things and new coding styles.
Instead, people want to impress at work, and this results in unintelligible, chaotic code, full of bugs and that people can't read. They want to mix in the coolest technologies because they feel their virtual penis growing to showoff that they are latest bleeding edge technology experts and all.
They want to experiment on business code at the expense of all the other poor devils who will have to manage it.
Heck, I even worked with a few Microsoft MVPs.
Those are deadly. They're superfast code throughput people that combine lot of stuff.
THen they leave at you the problems once they leave.
This MVP guy on a big project for paperworks digital acquisiton for a big company did this huge project I got called to work in, which consited in a backend and a frontend web portal, and pushed at all costs to put in the middle another CDN web project and another Identity Server project to both do Caching with the cdn "to make it faster" and identity server for SSO (Single sign on).
We had to deal with gruesome work to deal with browser poor caching management and when he left, the SSO server started to loop after authentication at random intervals and I had to solve that stuff he put in with days of debugging that nasty stuff he did.
People definitely can't code, except me.
They have this "first of the class syndrome" which goes to the extent that their skill allows them to and try to do code backflips when they can't even do code pushups, to put them in a physical exercise parallelism.
And most people is like this. They will deny and won't admit, they believe they're good at it, but in reality they aren't.
There is some genius out there that does revoluitionary code and maybe needs to do horrible code to do amazing stuff, and that's ok. And there is also few people like me, with which you can work and produce great stuff.
I found one colleague like this and we had a $800.000 (yes, 800k) project in .NET Technology, which consisted in the renewal of 56 webservices and 3 web portals and 2 Winforms applications for our country main railway transport system. We worked in 2 on it, with a PM from the railway company.
It was estimated 14 months of work and we took 11 and all was working wonders. We had ton of fun doing it because also their PM was a cool guy and we did an awesome project and codebase was a jewel. The difficult thing you couldn't grasp if you read the code is if you don't know how railway systems work and that's the only difficult thing.
Sight, there people is macking me sick of this job11 -
Nothing says asshole like a guy who won't approve your MR even though the feature is working but they prefer implementing it using their preferred approach.
Different coding styles for different folks. What matters is that the approach used is efficient, working and tested. But oh no, you have to write the code exactly how they want it.
Good thing we're free to merge our own MR when the reviewer takes more than two days to merge it.4 -
Honestly? The environment... I have different styles in different languages and IDEs, for example I started Java with NetBeans that defaults brackets to same line, so when I use Java I default to same line brackets, C# on the other hand, Visual Studio defaults to brackets on their own line, and so do I.
You could see me write same code on different languages/environment and it would be styled differently. Yes I know, I should be burning in hell,I am THAT kind of guy xD3 -
You work in a team, for a team to move forward successfully the team should work in sync. A team always has a goal and a plan to get to it. There are times when the team needs to take a different direction therefore the set path should always be available for change because our environments dictate it.
We all have different styles of working and different opinions on how things should work. Sometimes one is wrong and the other is right, and sometimes both are wrong, or actually sometimes both are right. However, at the end of it all, the next step is a decision for the team, not an individual, and moving forward means doing it together. #KickAssTeam
The end result can not come in at the beginning but only at the end of an implementation and sometimes if you’re lucky, during implementation you can smell the shit before it hits the fan. So as humans, we will make mistakes at times by using the wrong decisions and when this happens, a strong team will pull things in the right direction quickly and together. #KickAssTeam
Having a team of different opinions does not mean not being able to work together. It actually means a strong team! #kickAssTeam However the challenging part means it can be a challenge. This calls for having processes in place that will allow the team members to be heard and for new knowledge to take lead. This space requires discipline in listening and interrogating opinions without attachment to ideas and always knowing that YOUR opinion is a suggestion, not a solution. Until it is taken on by the team. #KickAssTeam We all love our own thinking. However, learning to re-learn or change opinions when faced with new information should become as easy to take in and use.
Now, I am no expert at this however through my years of development I find this strategy to work in a team of developers. It’s a few questions you ask yourself before every commit, When faced with working in a new team and possibly as a suggestion when trying to align other team members with the team.
The point of this article, the questions to self!
Am I following the formatting standard set?
Is what I have written in line with official documentation?
Is what I am committing a technical conversion of the business requirement?
Have I duplicated functionality the framework already offers?
I have introduced a methodology, library, heavily reusable component to the system, have you had a discussion with the team before implementing?
Are your methods and functions truly responsible for 1 thing?
Will someone you will never get to talk to or your future self have documentation of your work?
Either via point number 2, domain-specific, or business requirements documentation.
Are you future thinking too much in your solution?
Will future proof have a great chance of complicating the current use case?
Remember, you can never write perfect code that cures every future problem, but what you can do perfectly is serve the current business problem you are facing and after doing that for decades, you would have had a perfect line of development success.1 -
I tried building a project with nextjs. I dont like it. Angular is still better. Nextjs might be more lightweight but i dont care. Theres way too much shit i need to write and theres no boilerplate code like there is in angular. Also in angular components can be grouped in 1 directory and from there you group its services interceptors guards scss typescript html etc. In nextjs all of that shit is thrown in /pages and /components while styles go to /styles. Reasonable, but what happens when the application is large as shit? Thats why angular will always win long term2
-
Nothing quite so frustrating as intellij resetting your code styles. You put them back as best you can and they get put back to default again.
So you log in to every computer you use, disable settings sync, and do it AGAIN only to find some of your code styles settings aren't even available anymore. So now you have to be extra careful formatting a document doesn't change things you've had just the way you wanted for years.
But realistically, what other option does a person have?6 -
Last 2 days went as following:
This is a mess I've got to fix it before we can't actually do work.
Today: fixed finally now let's run
Wtf styles all messed up.
(Check source code)
Third party source changed wtf.
Can it be fixed:
Checks over whole page. Noooo even html wrong. Typescript wrong.
Solution:
Rewrite 3 months worth of work in 2 days -
!rant
I'm just a beginner with CSS, nodejs, sass and whatsoever. Also I really enjoy writing my docs with Markdown, so I decided to make an effort and create a project that aims to create an easy-to-use and easy-to-apply Markdown themes, that can be customized.
I know that this may be horrible code, but If someone can point me in a good direction, I'd be glad to learn and apply it.
https://github.com/apexJCL/...1