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 - "wk181"
-
When I discovered Clean Code, design patterns, TDD and BDD. It just clicked. Ever since everything build so easy and obviously. I no longer have most of the code problems folks rant here about.
That's when it came to me: it's not enough to know how to write code. To climb off those amateur shoes I must adopt those methodologies, so that the code would be decoupled from me, from my style, and I've got to let tests drive my code rather than vice versa to have a flexible and reliable codebase that is cheap and easy to maintain/extend.40 -
When I wasn’t the lead yet there are so many things I want to do and improve. I have asked and judged my lead’s choices a thousand times for choosing the easy and fast way instead of the right way.
Now that he left and his role was given to me, I can now sense the same judgements from my members to the decisions I make (or not make).
I now understand. We don’t always have the luxury of time. If I say yes to improving everything at once then our app will never be done. (That our bosses will blame me for)rant decisions improvements time team its too late to use typescript team stuck at angularjs 1.x deadlines wk181 lead4 -
I was to optimise a SQL query (7 min to execute,yes) with around 20 joins (I did not write this). Checked for missing indexes,etc.. but nothing worked. Stared outside the window, and back to desk reordered the joins ,executed in 10 secs.1
-
When I thought I had bricked my HTC Hero while trying to load a custom ROM and it just didn't boot. I had a real eureka-moment late that night when I understood the whole process and successfully flashed it in a non standard way to get it back working.
I haven't thought about this for a while and it wasn't really dev-related either more than problem solving. That moment was also realisation that I both love and hate technology.1 -
So I participated in this year's Hacktoberfest and it was really cool. Gonna get a free t-shirt and stickers for completing the October challenge. Hacktoberfest 2019 was presented by DigitalOcean and Dev and 4 pull requests were required to be made by you in any GitHub-hosted repositories/projects to get the free swags. It was open globally. I feel events like this encourages budding developers to learn more and exposes them to new ideas. Anybody else out there who participated in the Hacktoberfest? Still waiting for my t-shirt :'(3
-
Computers are not tools, they're weapons, no ones data is safe, and most people are just oblivious to what's really going on in the Network Security and Data Security sector.4
-
Axiom of dev epiphanies: they always happen when you don't have immediate access to your workstation
-
My biggest dev epiphany was also my dumbest one. We were working on a payment system for a roadside rescue company where an employee would register payments "in the field".
The challenge was automating input with typeahead and autocompletes in order to lessen the workload as manual input had to be an absolute minimum; this will be used by truck drivers/mechanics as they are trying to hurry to the next customer who has been waiting for 3 hours longer than we said we'd take.
We managed to make the invoice path first (customer has not paid, employee logs personalia needed for billing), but when it came to "paid on site" we almost upended the entire system trying to find a way to fetch user personalia outside of the invoice path.
Neither of us realized it during the days we were banging our heads against it. Realizing we don't need to make an invoice for a job that has been paid for was equal parts relief and utter embarrassment.
Probably my greatest lesson in how important it is to pull my head out of the code once in a while, and to ask myself what I'm trying to do and why. -
The day I read The Simulation Argument, by Nick Bostrom, a thought popped into my mind: "if we are made of code, maybe there are ways to hack life as you would hack some random program", I started thinking privilege escalation over the simulation, buffer overflow, picking signals as if I was eavesdropping... it was an epiphany and also fun10
-
While driving home from work.
Then I have two choices either fix it when I get home or remember to fix it the next day, which I then have to think very hard to remember what the solution was.
Should have fixed it when I got home ... 😫1 -
When, after trying and debuggin everything else, I realized in the shower, that I forgot to annotate my method.
-
I was trying to make a circular buffer in C++. I was also trying to expose iterators for using the buffer with STL algorithms. I kept trying to think about how to add the functions needed to manipulate the existing internal iterators to not exceed the bounds of the buffer. Then I realized I was "too close" to the problem. There was no way I could properly control the internal iterators of the storage vector I was using. Not without giving too much power to the user of my library. So I abstracted the iterators up one level. Hid all the details of the internal iterator and made a new iterator.
The solution of abstracting the iterator was not the epiphany. The epiphany was if you are struggling with how to solve a particular problem. You keep running into problems with how to represent something, there is too much power available at a particular representation, or the object you are trying to make work just don't fit. This is when you should consider abstracting a level up. Take a higher look at the problem and simplify the interface.
Abstraction could be a number of things. Divide and conquer, hiding details, specializing an object, etc. Whatever tool is needed to make the problem more consumable to your brain. -
A few weeks ago a friend was teaching me about 16bit numbers because we were making one in C# with a function, but he said we need two numbers for the function to work.(so as an example were gonna use 0, 2)
Now I didn’t understand how two numbers were supposed to make one. And my friend could not explain it to me. So I researched the topic all day and the epiphany happened I realized I was looking at it all wrong. I shouldn’t be looking at it as 2 decimal numbers but 2 binary values or two binary arrays forming one byte array with a length of 16.7 -
MongoDB database with really relational data. One main collection that had refs to four other collections, all of those references necessary to populate data for a page view. Complicated aggregate to populate all the necessary data and then filter based on criteria selected by the user. And then the client decides that he wants the information to be sortable by column. Some of those columns are fields on the main model, no problem. Others are fields on the refs, which is more of a problem. Especially given that these refs aren’t one single object. They’re arrays of objects.
The revelation was that I could just write an aggregate function to flat map the main collection, returning only the fields necessary for the search, and output it to a new collection and instead use that new collection for displaying and filtering/sorting search results.
But you can’t run the aggregate all the time, you surely say. If anything changes in the main collection, it won’t be reflected in the search results!
Mongoose post(‘findOneAndUpdate’) hooks, my friends. Mongoose post(‘findOneAndUpdate’) hooks.
Never been so happy to have a thing working properly in my life.2 -
Epiphany..?
My first was in the toilet, I had to clean up fast and go to my laptop to catch up the idea, when it worked I realized I will love this field.
After few years, with this stress and anxiety. I am slowly having my next big epiphany that this is not my job.1 -
making my own working parser for a project i worked on
i used it to turn a custom file "format" (think json: a format but still plain text) into code / functions on the fly1 -
I've mentioned this before, but I never really understood bit flags until I tried out Cocos 2D and read about how you implement hit detection. You identify different rendered objects with an enum value, and it would spit out a result every frame that you use bitwise logic on with the enum to determine which objects were touching. Such a simple and elegant way to represent combined state.
It may be elementary for some folks but I was not a CS major.1 -
I would have wanted to bring up SICP again, with the great big warning about the evil assignment operator and state and all the troubles that ensue (just think: concurrency).
But in a way, nothing has really come up from this or my attempts to dig deeper into "everything is a file/object" (Unix, smalltalk), neither from formal languages or the Curry-Howard correspondence. - Maybe there's just nothing, no firm bottom ground to discover. Like the physicists going for their world formula, but instead of a grand, beautiful symmetry that explains everything, we face a shattered world of (incompatible) theories, that is ever so more complex and chaotic through our theories applied to it. There may not be a Platonic ideal world of ideas, but rather partial constructs explaining some particular perceptions.
Similarly the one perfect programming language to rule them all, the perfect abstraction, pattern is probably just another prepubertal fantasy to be sunk.
So maybe instead of seeking the perfect epiphany, we should go for something quite different: the nagging, brooding uneasiness that something is wrong there, that there's something to be fixed... that even negative feeling would propel us to search further, not to stay in whatever is touted as the real thing.
Such irritations I found with Pieter Hintjens' writings. For example when he actively engaged in conspiracy theories. And I'm still not sure, if he just went off the cliff or he's even right alluding that these theories are an act of sanity, a self-defence against the hidden evil mights. I just don't know. Anything. -
After doing online code exams. I did a job interview for a game company where they asked me to write a spigot and bukkit plugin in Java in advance. I learned minecraft dev, the libraries, Java, and minecraft itself. I built the plugin.
I get to the interview and they tell me that my work was great but they already filled the position.
Omitting school projects because my pay was knowledge which is more valuable than money.2