cover image by Libertinus Yomango
also despite writing Markdown every day for the last three years, I messed up the link above in v1 of this article
So, I'll admit it: sometimes I forget basic syntax. I think what gets me is the semicolons inside the parentheses. I feel like they should be commas? I don't know.
The point is that when I write for loops:
let str = '';
for (let i = 0; i < 9; i++) {
str = str + i;
}
I always manage to mess up just enough that it's better to grab the syntax from the MDN than it is to write over again.
And really, it feels like a shameful admission but I don't feel embarrassed. H*ck I do stuff like this on my livestream and I don't think there's any reason that we shouldn't copy and paste basic syntax.
This is a place of honesty, take a moment to admit your not-so-shameful 'shameful secrets' about the reality of working in tech.
Top comments (29)
I usually let my IDE do that for me nowadays. typing "for" brings up an autofill for all the different ways to type a
for
loop, it saves a trip to my browser and back. No guarantees if I could type it from memory..!how do you that hehehe
It depends on which editor you're using. for webstorm (IntelliJ), by default can type
fori
:for (let i = 0; i < ; i++) { }
forin
:for (const item in arr)
for (const item of array) { }
typing "for" for brings up this tooltip, I can select with arrows and press tab for it to autocomplete. if you remember which template you want, you can just type eg "fori" + tab without waiting for the tooltip to show up.
It's also similar in vscode. iirc, typing
for
will give you a bunch of options for the different iterators.nice thanks man! awesome
your IDE will have a bunch of different ones. worth having a look wherever they're located in for other useful ones :)
I would always delete robots.txt from whatever web boilerplate I was using. I didn’t know what it did and thought it was creepy
This is a real one
technabob.com/blog/wp-content/uplo...
I don't know if this is very relevant to the post, but I feel ashamed that I don't fit in with the stereotypical programmer geek. I'm one of the few women in my class who chose to pursue programming as a job after graduate. Most girls feel like they don't fit in, feel inferior, and chose to do other related work (e.g. product owner).
It wasn't really about gender, but it does play a role. What's most shameful is the fact that I'm not devoting all my time coding. I have other hobbies unrelated to programming (and photography, idk why but my "geek" friends tend to do these 2 things).
Most of the time I feel like I don't master this language/framework/tools enough to creatively and efficiently use it. That I'm not writing the most efficient code. I have this friend who likes to complain how people codes are bad (which I learnt from him a lot), and that put my confidence down lower than ever..
I'm trying to work on that, but it's exhausting sometimes not having people similar to you in the field or as a representative.
Coding has never been my hobby, and I've been super successful just by doing it at work. Those people who are looking at code 12 hours a day will, in all likelyhood, be burnt out in 5 years.
And keep in mind anyone questioning a new coder for their commitment is, i guarantee, insecure! Experienced devs confident in their skills don't question others.
I see. Thank you so much! Also, seeing how you are confident to be yourself in this field has given me so much inspiration too!
So don't use explicit loops 😅
The best part of using this instead of a for loop: you'll never remember what you're supposed to search for on Google, so you'll be forced to memorize the pattern!
Maybe this way of doing could seem a little overkill but has advantages :
Not overkill in my book. I'm a fan of Elm and F# and Haskell. I think this kind of FP approach will supplant OO in time.
I think everyone does this. My kryptonite is 'this' in javascript. Sometimes, I go for weeks writing PHP only in (pick a) framework, and if I switch to 'vanilla' PHP, I have to google the simple things.
I write SQL, VBA, js, python and c#. Remembering the syntax difference is not worth the mental overhead when the internet will give you a copy paste answer in 30 seconds. What does wind me up though is the lack of wildcard consistency in the Microsoft stack.
Anyone got any other wildcards?
I keep learning and relearning javascript over and over and over. I remember one time, it was a simple integration of a theme we bought for our dashboard. I was assigned the task of modifying one css class and ... it became the next three days css-ing. Respect to frontend developers.
Hey, where is the content?
This is a discussion post! I'm asking you and other readers to comment back :)
Ok, sorry for the comments. I was hoping for an article about this, I would be interesting!
It’s not shameful.
15 years writing Ruby code almost every day yet I still Google the Ruby CSV class at least once a week. It’s not even a complex class!
SAME. I have to google it for JS and Ruby because there are different forms and they are similar, but just different enough that I get them all mixed up between the two languages. 🤦♀️
yeah I think this is what gets me: I write a little bit of Ruby, Python, and JS. It's that language confusion that gets me. When I write C# for games I'm much more confident since the syntax is so different!
Some comments may only be visible to logged-in visitors. Sign in to view all comments.