Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "spaces rule"
-
Spaces Vs Tabs - A real world case.
So one of the menial tasks I was given here was to take a pretty mock and turn it into an HTML email template. Needless to say, I hate emails and HTML.
After many weeks of trial and error, rejection and tweaks, we're doing our final tests when someone noticed that Google's clients are chopping off the footer and saying "View Full Email".
A few searches yield that Google has a 102KB cut off for email size. We did some checks and found that we were at 104KB. I immediately thought it was my CSS inliner being a little too verbose, but as I went in to edit things, I noticed that the file was intended with spaces!
Now I'm a fan of Silicon Valley, and I recalled an episode from this past season where Richard mentioned something about saving file size by using tabs. I had never really considered that point.
So I went back into VSCode and told it to convert all of the individual templates that make up this giant email to indent with tabs...
The file size dropped from 104kb to 82kb.
I wasn't very polarized on the Tabs vs Spaces debate, but this here has given me a nice real world example as to why tabs rule.20 -
What is considered best practice for code indentation? When I'm working with HTML and Javascript my rule of thumb is 2 spaces for indentation, and with Java and Python it's 4 spaces.
Also I'm trying to break my bad habit of mixing tabs and spaces. It's messing with the laws of physics.12 -
I used to love tabs and absolutely despise spaces, but a combination of using IntelliJ and company code indentation convention has converted me to the dark side #spacegang4
-
It all began with an advanture.
i was travelling through codeland and met all sort of nice creatures. C++ and Java were among my first encounters. C++ was geary (full of gears) and java was objected (sorry made up of objects). nice folks. was still wandering when a halous (great, a halo around) person appeared. it was the nice python.
he likes to take his meeters (people who meet him) on a fairic (fairy-like) ride, passing countless of flexible alleys, open (source?) spaces as well as honey falls (waterfall-like streams).
but something was odd, really odd, .... travelling. you could not walk in here you had to fly. fly fly fly. no foot touched the land. no android they said.
or they said you have to put on a pair of shoes called kivy. the shoes fit according to no fixed rule. sometimes they worked, sometimes no. another pair of shoes called sls4. it was nice but unfortunately was only half a shoe long on each feet.
python android is still a dream, a nice binding kept ridiculously in the egg. it is yet to hatch.