Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Search - "counting sort"
When I was in 7th grade, my neighbor (a DoD programmer) challenged me to write a sorting algorithm for a hypothetical super limited environment (he said a satellite). It didn’t have any built-in sorting methods, had very limited memory, slow processor, etc. so I needed to be clever about it.
It took me a few nights before i found a solution he liked. The method I came up with counted the number of occurrences of each number in the array and put them in the appropriate spots in a new array. This way it only required O(2n) running time and 2n memory.
I just learned today that this is called the “counting sort” 😄
I’m proud of little 11 year old me.20
I just programmed a counting sort algorithm, and I swear to God I think it has AI. Sometimes it works and sometimes it doesn't.3
Most ignorant ask from a PM or client?
So, so many. How do I chose?
- Wanting to 'speed up' a web site that we did not own, in Sweden (they used a service I wrote). His 'benchmark' was counting "one Mississippi, two Mississippi" while the home page rendered on his home PC and < 1MB DSL connection (he lives in a rural area).
- Wanted to change the sort order of a column of report so it 'sometimes' sorted on 'ABC' (alpha) or '123' (numeric) and sometimes, a mix of both. His justification was if he could put the data in the order he wanted in Excel, the computer should be smart enough to do the same thing.
- Wanted a Windows desktop application to run on an android.
- Wanted to write the interface to a new phone system that wasn't going to be installed for months. Even though we had access to the SDK, he didn't understand the SDK required access to the hardware. For several weeks he would send emails containing tutorials on interfacing with COM libraries (as if that was my problem).
- Wanted to write a new customer support application in XML. I told him I would have the application written tomorrow if he could tell me what XML stands for.4
- Launch the new version of the system I have been refactoring for 2 years and counting, then ceremoniously burn (literally) the legacy code as well as the cluster fuck of hardware it runs on.
- Decrease my stress + bus factor by bringing another up to speed on my code & the new version (his cluster fuck now).
- Pay attention to & take better care of health, my wrists in patricular.
- Find a mentor and mentor someone else.
- Get out of crisis management mode and find the time to write tuts, experiment and live a little.
- Find & join a local dev meetup, maybe make a local dev friend.
- Book leave and actually take it, preferabbly without having to take my laptop to the beach - actually, preferabbly at least have the choice to take a offline vacation.
- Sort through the drives containing ALL the code I have ever written, migrate the usefull interesting bits to Github.
Phew, that bit of self reflection was intense! I'm adding a cron to my server to sms & email me this rant in a year to remind me what hope looks like.
Fuck my country's universities, fucking greedy assholes that ruin lives, suck wallets and sucks life from the young.
I'm currently studying something completely non related to programming: History. And I really love it. I love reading 1000 pages for each test and essay and talking about the problem of naming the Cold War a war and cold and etc. The problem is that I won't make as much money as I would make even as a self taught developer.
After considering my possibilities, I thought I could enter the computer science carreer. I don't know how this works in other countries but here you would have to study 3 years of an engineering common plan and then specialise in some sort of industrial engineering while getting an specialisation also in computer science. After some counting, I got to the conclusion that I would be studying 6 years (or more), and wasting half of those years learning stuff that I would never use nor care about.
But that's not all. This semester I took the introductory class for programming. It's pretty basic stuff but at least they teach a little bit about algorithms and problem solving. It turns out that a friend of mine that's about to graduate from computer science applied as a helper for the prof. I was so excited I could finally talk with someone about code!
Since the start of the semester I have been passing a lot of time with him and talking about the future. Turns out he doesn't understand shit about code but somehow he learns everything by hard and has passed every computer science course without having any practical abilities. I don't blame him, he's studying hard and playing by the rules, and turns out that he has wasted precious time of his life also learning biology, chemistry, structural engineering, hidraulic engineering, transportation engineering and a ton of engineerings that he won't use.
If the university would instead take that time to teach better courses of practical programming or leave him some time to try out the stuff he learns by hard, he wouldn't have to hear me talking about stuff he doesn't comprehend but feels that should, and wouldn't be utterly depressed, he wouldn't take SIX years to learn less than what he could learn in less than THREE years. And this isn't just a random university, it is one of the 2 best universities we have here and was in 2014 the best of all Latin America.
And wait, here comes the best part. In my country, levels of education are heavily stratified. After school, superior studies give different titles according to the time you've been studying. Yes just the time. And these titles are what your employers will see to give you different work positions. So for studying a 2 year carreer you get a technic job which pays well but not too well, then at 4 years you get a license title which only proves that you know stuff, then at 5 or more (depending on what you are studying) you get a professional degree and will get payed as a full fledged professional. So here, even though in other countries it takes 6 years to have a masters in engineering, they give you just the engineering degree, and it would take 2 (or more) more years to have a master. Even though you can totally teach engineering in 4 years, here they take BY LAW 2 years more, while paying what a fucking full stack of pairs of kidneys would cost in the black market.
So fuck that shit, I won't be throwing my money at any university. I hope they get reformed soon becouse this is fucking dumb, really really dumb. Like 2 year old shit dumb. I'll just learn a bit more, make some projects until I have a decent portfolio and apply to some company that cares for real knowledge and not just a piece of paper with letters and a shitty logo on it.11