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
Md. Al-Amin -
Harshal Ranjhani -
ViitorCloud Technologies -
Deborah Curtis -
Top comments (45)
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.
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 š¤·āāļø
Regex.
regex101.com/
Is my go-to. Punch in a regex and it'll tell how it breaks down. Punch in some sample data to see if it matches or not. It also gives performance feedback too (steps + total execution time). Never mess around with regexes in the dark again.
I also like regexr.com. A little more minimal if you get the gist!
It is definitely a faster loading web app and it might even run locally? I'm pretty sure regex101 was the first tool like it out there and I've seen a few others over the years...but my fingers type in what they remember!
Haha -- hey, no harm in that. As long as it gets the job done!
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.
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.
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.
substr vs substring
vs slice.
MySQL update with join syntax
I always look up pretty much anything Javascript. Mostly to find the MDN and CanIUse entries to determine browser support and maybe read a StackOverflow post or two on the topic. With browsers constantly changing usually for the better (but not always), it's kind of pointless to try to remember what browser version supports what function or event or feature.
For PHP, I just go to php.net but I inevitably need to search for the date() function 80% of the time I visit php.net. Do I need "F j, Y" or "M j, Y"?
Any time I have to use Perl, I end up having to relearn the entire language from the ground-up. Most languages I can remember enough of to fumble my way around and eventually find my way again - kind of like learning to ride a bicycle. With Perl, it's beginners-ville every single time.
Maybe with Perl it is, because there is always one more way to do it?
I always use to search for syntax. Because I always forget syntax and think that I am fool who can't remember syntax whether it's python or javascript. Moreover, sometimes I search for functions name, such as push in javascript and append in python. I always mix them.