DEV Community

Cover image for What do you find yourself searching for again and again?

What do you find yourself searching for again and again?

ItsASine (Kayla) on January 11, 2019

For what is likely the 6th time, I Googled netlify multiple github repos custom domain. And for the 6th time, I've come across this purple link abo...
Collapse
 
andywer profile image
Andy Wermke

CSS flexbox properties! 🙈

The really basic ones are fine, but is it align-items, align-content or what right now? Even if I used those props multiple times the same day already...

Fortunately, Chrome autocompletes the URL to the cheat sheet right as I start typing "flexbox" in the address bar. It knows me so well... 😅

Collapse
 
acostalima profile image
André Costa Lima

Haha, so true! Especially flex short-hand.

Collapse
 
pretzelhands profile image
pretzelhands

One day I'll remember the parameter order of functions like strpos, in_array and array_search. That day is not today.

Some of them use needle first, some of them haystack. But I always find myself reaching for php.net because for the life of me I can't remember.

Collapse
 
david_j_eddy profile image
David J Eddy

I got tired of that as well, so I made this:

davidjeddy / normie

Wrapper library that provides normalized function interfaces for the PHP standard library.

Normie

Badges

Build Status License codecov

Latest Stable Version Latest Unstable Version composer.lock

Scrutinizer Code Quality Build Status Code Coverage Code Intelligence Status

Monthly Downloads Daily Downloads Total Downloads

Contributors

Description

Normie (short for Normalizer) attempts to make using the PHP Standard Library (SPL) function calls more consistent by implementing a norm_{function name}() wrapper function declarations. This library DOES NOT over ride the SPL functions in any way.

Examples

Function parameter order examples.

Arrays fn()

Normie array functions follow the 'array source X, operator Y (callback,key, needle, etc), other parameters are Z' mentality. The complete list of array functions are viewable here.

SPL: array array_map ( callable $callback, array $arr1, array $_ = null) { }

Normie: array norm_array_map( array $array, callable $callback, array $userdata = null): array

Strings fn()

Normie string functions follow the 'Search X string or Y target, replace with Z string' mentality. The complete list of string functions are viewable here.

SPL: array explode ( string $delimiter , string $string [, int $limit = PHP_INT_MAX ] )

"...Normie string functions follow the 'Search X string or Y target, replace with Z string' mentality..."

Feel free to use it and provide any feedback.

Collapse
 
tvanantwerp profile image
Tom VanAntwerp • Edited

If an effort to get past some of this, I've started adding anything I google too frequently into Anki for me to study and memorize. I've found spaced repetition learning to be very useful.

It used to be that, if I wanted to hunt down every file in my repo with a certain bit of text in the code, I'd have to Google exactly how to phrase that in grep. Now, I just know to grep -rl "the string in question" /path/of/repo. I wouldn't say I've "learned grep", but I know that one command that is all I want 99% of the time. Little quirks of languages, remembering the order of things in bash commands, bits of APIs you need all the time--all of them great candidates for a flash card. If I weren't using an SRS system, I'd be wasting lots of time looking it up because I never memorized it.

There are still plenty of things I don't have memorized; but I keep adding to my study deck and, slowly but surely, cutting down on Googling.

Edit: for a good general explanation of spaced repetition systems, I recommend this interactive by Nicky Case.

Collapse
 
ben profile image
Ben Halpern

There is certain functionality, like how to conduct basic operations on data structures, which I definitely know myself if I think hard enough about it, but I default to Googling it anyway. It's just easier to offload some of it to the cloud, especially if it's wordy.

For example getting a random value in a JavaScript array:

var item = items[Math.floor(Math.random()*items.length)];

That's wordy and kind of unintuitive. I don't even try to remember just how to do it.

In Ruby, for me it's probably simpler to remember:

item = items.sample

Of course, there are plenty of operations I similarly Google every time in every language including Ruby.

Any time postgres stops running on my machine, I go find this command:

pg_ctl -D /usr/local/var/postgres start

I probably could remember that, but I've never bothered.

Collapse
 
jakesweb profile image
Jacob Colborn

The most basic thing that I look up is how to find the largest directories on a Linux workstation. I have been using Linux for about 6 years now and I still have to look up the du command syntax every single time I use it.

Collapse
 
txai profile image
Txai

REGEX!! I simply can't remember the syntax. Also various functions from C standard libraries specially strtok and pthread_create

Collapse
 
itsasine profile image
ItsASine (Kayla)

Now I just skip straight to regex101 rather than search and inevitably just give up and type symbols in regex101 until it does what I want.

I conditioned myself to not search for regex help, I guess ^^;

Collapse
 
jdelgit profile image
jdelgit • Edited

Anytime I want to do anything with regex I use regexr.com/, you can test if it's gonna work on a sample of your dataset.

Has a handy cheatsheet on the sidebar as well

Collapse
 
tvanantwerp profile image
Tom VanAntwerp

If you want some regex practice, I really enjoyed these games.

Collapse
 
txai profile image
Txai

Defintely gonna try these, thx

Collapse
 
acostalima profile image
André Costa Lima

Yeah, regex can be hard sometimes. Gladly, there are some great tools out there to guide and help us figuring out the right expression.

Collapse
 
michaeltharrington profile image
Michael Tharrington

Right now, it's just basic terminal commands for me. Haha, total newb. But, I got my flash cards and am getting better. I trust these things will sink in eventually. 😄

Collapse
 
val_baca profile image
Valentin Baca

Good luck!

I think that this post would be very helpful because it gives what commands other devs use the most:

dev.to/abhinav/which-is-the-most-u...

Collapse
 
michaeltharrington profile image
Michael Tharrington

Bookmarked! Much appreciated. 👍

Collapse
 
alanmbarr profile image
Alan Barr

The flags for untarring and unzipping a .tar.gz file

Collapse
 
garthgoldwater profile image
garthgoldwater

Amazon AWS tutorials. I find the organization of their console to be basically inscrutable even when I fully understand what it is I'd like to do—can be very hard to find and order the operations. And the docs are pretty rough from a clarity perspective so I end up having to look at three of them and a blog post to identify what's actually going on.

Collapse
 
oathkeeper profile image
Divyesh Parmar

How to do certain stuff with Git and when to use git cherry-pick or git submodules.

Most of the times I search how to not add certain files in this commit and only few others without even git add those particular files

Collapse
 
molly profile image
Molly Struve (she/her)

ActiveRecord query methods! All the includes, selects, joins, etc. AR has so many tricks that I can never remember them all so I am always Googling 😊

Collapse
 
david_j_eddy profile image
David J Eddy

Linux grep and find options; specifically 'how to find text in a file globally'. I really should just make an alias.

Collapse
 
val_baca profile image
Valentin Baca

Not to throw another command in the mix, but ag the silver searcher is really, really great.

99% of the time I use ag where I would use grep or find.

Collapse
 
goyo profile image
Grzegorz Ziemonski

Almost every basic thing you might want to do in Python. I’ve started using the language a couple of months ago and it seems to have its own quirks everywhere 😀

Collapse
 
david_j_eddy profile image
David J Eddy

That never changes, always have the docs nearby :).

Collapse
 
juliavii profile image
juliavii

Unzip taz.gz.

Its one of that commands I literally use one time every three months and completely forget the flags every time i use.

Collapse
 
buinauskas profile image
Evaldas Buinauskas

How to reset branch contents to what's on remote 😐

Collapse
 
itsasine profile image
ItsASine (Kayla)

Lately, I've taken to deleting my local and repulling a fresh branch from remote :)

I suppose I should just hard reset.

Collapse
 
joshbrw profile image
Josh Brown

PHP Date format. Every. Single. Time.

Collapse
 
gsto profile image
Glenn Stovall

Lately I've been doing so much with react-google-maps I've bookmarked the docs page: tomchentw.github.io/react-google-m...