Hacker Newsnew | past | comments | ask | show | jobs | submit | redcat7's commentslogin

I love academics. They can post shitty code full of single letter variables etc and still get the applause for it, not to mention the paycheck :D


This is not shitty code, single letter names have their place, and are absolutely fine here.


I like Golang's convention for names - names should get longer and more expressive the wider their use is across the code. Single letter names for loop variables, two or three letter names to refer to the current struct in methods, but expressive struct and function names.


academic is about computer science not computer programming. 2 very different things, their "shitty code" is often "good computer science code" and just like it's fine to have single letter variables when reading mathematics, it's the same when reading computer science code. the idea is to get knowledge across which can then be expressed clearly by computer programmers.


Regarding this example, which variable could do with being longer? It seemed fine to me!


you cant do it on a first go. i write a draft of what has to happen. often i draw drafts of the solution on a4 sheets of paper(my own blackboard, the best tool i know to make software). i do research and update the drafts to a point where i type in the code. code is the last thing i do. i laught that i make coloring books and not coding :) i am quite fast and i have little problems with switching contexts. the code is much better as i "see" the whole solution. i have much better abstractions. in a recent task i have found with this way of coding, many places with bad code and made them better as they didnt fit the cleanliness of the soulution. they just stand out like the eifel tower in paris.


wow, so my assumptions that coders dont design and draft solutions, but type in furiosly code to make it work where true. i recently begin to believe the teaching how to create software is fundamentaly flawed. now i have more evidence. wow.


i dont like typing. it is a waste of time and very slow and error prone method at least in my case. i have too big fingers and i make too much spelling errors(not related to fingers). i developed my own style copy/paste/search/replace method. simply i just copy paste tons of code(you cant type so fast) and replace names. removing redundand code is faster then typing new one :) you are not bored typing for the milionth time a for loop? :) dev environments suck with mouse, because people talk things like that(that mouse sucks and that you have to keep your hands on keyboard) and by that no one is spending time on developing dev environments for the mouse. and they are really flawed in this matter. vim and emacs suck at using mouse so please dont say mouse sucks. those editor suck at that. for years i was looking for tools good for my style of work until i figured out that no one makes them and my coding style is completly different from the one for which the tools are made for(i think people sit and type in the code as they go). you can find in many places that to be a dev you have to write code. that to be cool dev you have to type and use vim and there is no other way. which is bullshit. you want to make software faster? you have to operate on big chunks of code and not a single lines. the snippets suck also - you have to know them and interface is often clumsy by default. most of the things you have to remember(i think that makes being a dev hard). why we dont have starcraft like interface to dev?


upvoted because your experience is so diametrically opposed to mine that I find your message very interesting. One comment, though; when you say

> you are not bored typing for the milionth time a for loop?

I don't really follow you. Do you ever use a bicycle? You are not bored pushing for the millionth time the left pedal?


You could have already asked me if breathing makes me bored.

when i go ona a bike trip, i dont like wasting time on going through the neighborhood i know. so i take the train and go up to the more interesting part of the trip and have fun. do you know this trick?


also, i use i3, tmux, emacs and vscode on daily basis. i changed my unix experience(mostly cli) into something close to a roguelike game - shell scripting + fzf + make + direnv can make cool things together. the less typing the better, and faster.


I would be very interested to see a video of that. I'm always happy to see different setup.


I see how everything works. Humans, businesses, societies, machines, myself - everything. And I use that to have fun.


I want to make software development so simple that cost of entering the software industry and competing with current companies (except infrastructure) will be close to nothing.

I really want that normal people would be building functions on their computers which today are startups.

If everyone is super, no one is.


People already do this in Excel.


PHP community is here a funny example. Basically an example what happens when you bully coders that their languages sucks. They went for fullblown corporate style clean code rules (slow), for a language used in places where speed is crucial. This language currently is completly suboptimal for business if you apply clean code rules.

I've worked in 2 companies that used PHP, where php programmers formed a "clean code religion". One company died, another lost a lot of money. It was directly connected to the clean code rules - they went over the deadline, by a lot, they created overbloted code(but ok with the rules) that was pain in the ass to work on. "Code is documentation" was repeated like a mantra, which is a pile of bullshit by the way and is not making stuff easier (and I ended up with my own docs anyway). Clean code rules are cool if you don't know what you're doing and you want to hide it. It's a way to say "its not my fault, look I followed clean code rules, my work if flawless".

And coders in those companies didn't even noticed that there is something wrong. I've noticed when it was too late. In the second company, on my last day (half the company was sacked cause client got pissed and cut the money), we where in a restaurant eating and talking about programming stuff. Guys (who weren't sacked) where discussing a new web page they where working on. The main frontend guy, said he spend 2 weeks perfecting a dynamic menu cause he had some problems with loading time. The guy was rendering the menu in JS, on frontend, record by record. I asked him "if making dynamic menu is such a problem, why don't you have it prerendered in a text format, and then load that text when page loads, you won't need to render anything?" He replied that this would be against the rules and the code would have to use hack or something. I don't know any fucking rule that wouldn't allow me to do such a thing. I recognize eyes of a fanatic when I see them, so I've shut up. They solved the problem of menu by displaying users a loading gif when the code waited for menu to be rendered

After that day I decided I wont do any PHP gigs anymore. Nor work with something similar in syntax to PHP.


It's not just clean code, it's also things like microservice migrations or complete rewrites (preferably in a trendy framework or language) that makes programmers think they finally have the solution to all their problems (not those of the business, mind you), so they spend a bunch of time infrastructuring themselves down a hole they'll never escape, and bring the company down with them because they're "doing the right thing" or "fighting tech debt" or "breaking up the monolith".

Programmers should not have the responsibility to decide these things on their own; it should come from the companys risk assessments and help with the goal of the company, not the goal of the programmers (which is to put neat things on their CV.)

This is spoken as a programmer, by the way.


I haven't had that problem, but I do see a tendency for devs who enter the mid-level hump start to get big for their boots and want to clamp down on those below/around them doing things the "wrong way" (the way that isn't the way they like).

Normally you need a senior dev with a sense of pragmatism above them all to smack down any attempts to straitjacket the coding below/around them.

I use PHP a lot, simply because there's so much of it out there (lots of work), and one of the firsts thing I often do when taking on a project from another vendor is rip out any "no space at the end of the line" linting garbage and the like. As always in life, it's not about swinging for one side (vomitcode) or the other (anal styleguides), but achieving balance.


As someone who came after the whole php craze, could you describe what some of these practices were?


whot?? this is some kind of a new thing? i do everything in this fashion for years


sorry for earlier post, a lot of stuff still hurts.

i'm in poland. my type of manager would be a person who accepts me, gives me clear target and constraints and leaves alone, person who does his job, person who doesn't bullshit me and says the truth if we're in shit or not and realises that we are all on the same boat and we're also waist deep in shit so there is no point in fighting each other.

on 16 IT companies I worked in, there was only 2 such people. that's 12.5%. shouting and batshit crazy behaviors are normal.

someone here wrote that some things are cultural. a lot of stuff is cultural in poland. its a catholic fundamentalists country. so anyone who solves problems is a problem. people here had no type of french revolution or industrial revolution. basically its feudalism in modern dress.

last guy i worked for was freestyling everything. he had no plan. he told me he uses his imagination and he tells people what he had imagined and they have to do it. i found out about this when i was trying to resolve communication issues that i had with him. he often imagined new stuff and forgot to tell me about it and during code reviews he blamed me for not doing what he wanted me to do. i ditched the guy because he didnt wanted to do anything with that problem. the guy sabotaged himself throught the whole time. sometimes he had some strange outbursts.

there is a lot of such people in poland. a lot of office workplaces are like kindergartens. there's constant chaos. no plan. big ideas but nobody wants to wait. people who want things done asap usually are abusing others, not to mention that they are total morons cause abusing people takes time they dont have. most companies are micromanaged.

thing that keeps me going is knowing that, as someone said here, this stuff is cultural and that there are some better places. although after all those companies i'm kinda like a dog from the impound. i dont know how to trust people. word nation is for me the smallest joke possible to say. i'm afraid of polish speaking people.


most managers is drug&alcohol infused money starving 10 year olds with no fucking idea what they are doing and knowing only how to abuse people like their fucking abusing power figures called parents


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: