As developers who have progressed out of the "beginner" phase, we often underestimate just how far we've come. That's the nature of programming. Th...
For further actions, you may consider blocking this person and/or reporting abuse
Here's mine. It's from way back in October, 2014.
What really stood out to me about this wasn't so much the question itself, but the code I wrote for the Playlist class:
Putting aside the use of curly braces on a multi-line block, two things really stand out to me about this:
Thankfully someone on Stack was able to show me the light and help me realize I could easily refactor the class to the following:
For what it's worth, there is some merit in making a copy of the list, if you don't want to mutate the list that's been passed in at a later time for some reason. I'm not versed in ruby and I assume it does have a list copy operator of some sort, but there's at least merit in what you were doing, if not the mechanism. :)
Totally could see my past jr dev self doing this!
I wasn't sure what the craziest one would be, but here's the one with the most views/votes, and I think it's definitely interesting.
How to create a Web Worker from a string?
At one point, I had the idea to build a web application with JavaScript challenges. I wanted to avoid the hassle of finding a way to safely run the code server side, so I decided to run the submitted code in a web worker.
I initially tried creating a data URI from the javascript code, but kept getting the error that it was a cross-origin violation. The solution ended up being creating a Blow, and getting an object URI for it.
The first question I ever asked on StackOverflow was during my first month of learning to code
I was having issues getting the gems sunspot_rails and sunspot_solr up and running and solution after all the work I put in to writing an extremely detailed question...
Yep, space in the source path π Nowadays, that is something I would NEVER do but back then I had no clue! We all have to start somewhere π€