For me, it's reading/writing CSV's in Python. I've done it a thousand times but I can never remember the syntax.
For further actions, you may consider blocking this person and/or reporting abuse
For me, it's reading/writing CSV's in Python. I've done it a thousand times but I can never remember the syntax.
For further actions, you may consider blocking this person and/or reporting abuse
Oldest comments (45)
Switch statement syntax
This probably happens because most people aren't aware of where switch-case came from in the first place. The syntax came about to aid in creating "short jmp" tables in languages like C with intentional fallthrough, which became useful for things like loop unrolling where the performance gains were notable at one point. Loop unrolling was one of the many tricks used to make the first 3D game engines. Nowadays, loop unrolling can have negative side-effects on CPU branch prediction and cause a stall.
Other languages later adopted the style of switch-case but treat it more as a pseudo-if/then/else than something that generates a 'short jmp' table.
Switch-case today still has one very powerful use: State engines (aka Finite State Machines or FSMs/FSAs). Moving from one logical state to another enables powerful functionality that can't be accomplished any other way as efficiently.
SQL Server: UPDATE a table from a SELECT statement that joins on other tables. I always end up on the same Stack Overflow thread. Yet, to this day, I still havent bookmarked it, saved it somewhere or anything... That's 3 keywords on Google and SO has stellar SEO 🤷♀️
The shorthand form of css padding - e.g. when you do
padding: 8px 0
I can never remember which sides it applies to.Always clockwise. If one to all. If two, two opposite starting from top. If three top right side common buttom. If four clockwise from top. This is how I remember
Thank you, I've just been switching the values around until it works for the past 8 years. Kept forgetting to just look it up and keep it as a stickynote on my desk
For real! Me too
You can always use the long-form: padding-top, padding-right, padding-bottom, padding-left. There can be advantages to using the long-form as well if you don't want to override some parent style by accident.
I generally prefer using em (e.g. 7px is ~0.3em) rather than px for most padding and margins. That way, if someone enlarges the page, the padding/margins scale up too and keeps the presentation looking nice and spaced out properly without expending any extra effort. I use px in select (aka rare) locations where something needs to remain 'x' pixels from a specific edge regardless of text size.
How much water to add to 500g of flour for the pizza dough. I am always unsure, whether it is 300ml or 350ml. (300ml ... I just looked it up 🙃)
operator syntax in C#
This one hits close to home. I can rember other recipes but I always have to look up my pizza dough recipe
Definitely relatable 😂
CSS shadow.
Yes. It's definitely one of the most confusing aspects of CSS. I usually use a tool to aid me like:
cssmatic.com/box-shadow
They've still got a Flash component on the page and the default drop shadow settings are UGLY, but it gets the job done quick.
Network check
My ip
Calculator
SQL queries
Weather
Etc
I always keep SpeedCrunch handy and is usually running already. I use SpeedCrunch for general number crunching and some scientific stuff too. The Windows Calculator in Programmer mode is surprisingly handy when working with binary data.
Conversions though are another story. I'll fire up Google if I want to know what $1 USD is worth today in another currency or how many tablespoons to a quart or other oddball stuff.
substr vs substring
vs slice.
CSS transitions. Every time
Whether or not I'm supposed to use "text-align" or "align-text"
Most of the times, it's just for syntax and I think that's cool because we shouldn't waste our brain's finite memory to remember syntax from 15 different programming and query languages. Google search and StackOverflow have made remembering such things redundant. Obviously, it's good to remember stuff but you can't remember everything. There's just too much noise.
Now that everyone's mentioning, I don't really remember the syntax for creating triggers. It's really simple but I use them rarely so I can't get myself to remember it.