The dev version of "Who lies more: men or women?"

Apparently the above is a popular ice-breaker, and people who code have their version:

Which is harder: front-end or back-end development? *

Anyway, I think it's an interesting enough question as well as a popular one, so my take:
Back end is harder to learn, front end is more work.
Fair enough?
I have a PHP script in my archive that exists to grab data out of a MySQL database, and it's easy enough to nail one for adding stuff to said database together from an online recipe. I've had it for years. You have one, too, right?
Building it wasn't easy. Reviving it when I need to learn a new front-end platform can be tricky, too. Because copy/pasting it from an online recipe never works! And...it shouldn't.
Because every line matters, and understanding $mysqli and what it does, as well as how json is encoded by PHP and then parsed by your React Native or HTML front end, matters very much.
And even worse, all the parts that put this engine together matter. And they've all got gotchas and traps you should avoid.
For example, take a look at this command line command:

php -S localhost:8000

Can you see the problem? (No scanning quickly down yet! Think on it for a second.)

I didn't, either. Searching the googles and Stack Overflow didn't help. Which is embarrassing, because the problem and it's solution were right in front of my face the whole time.
I see why they make it hard - to coin a phrase, shit happens. How you handle the shit, how you think it through, and the emotional intelligence that you display resolving the shit, are what differentiate a competent employee from a star.

Give up yet? OK, here it is:
Never run your server script on localhost. Use your IPv4 address where it says localhost on that line!
Otherwise, your front end fetch() command will never, ever talk to your server script.



And other things Stack Overflow won't tell you.

Oy yoy yoyyyyyyy. It'll be fun making Go do that!
(ETA UPDATE Actually, it went very well. Go is an amazing back-end and server language, and I'll get into that in my next post!)

On the front end, though, it's not that kind of situation. CSS is pretty ridiculously easy to get a grip on - and if you've spent any time writing Javascript or another OOP-type language, SCSS/Sass are simple to get a grip on.
So CSS isn't a programming or engineering challenge - it's a design challenge ... which isn't better or worse.
Yes, you still need to know how to fetch() and pack and unpack piles of json data** - AND you have to arrange it all in aesthetically pleasing, tactile, easy to understand and operate interfaces. That have to match someone else's GUI kit templates exactly, down to the color hexcodes***. AND they have to work and look consistent and consistently wonderful on dozens of iPhone models, hundreds of Android phone brands, and tablets and desktops and...TVs?!?!?!

As for full stack, that just means you are efficient and adequate at everything. That's me.
There's a place for us, and I enjoy it...but there's also a place for someone who's astounding and incredible at one thing. They do well at bigger companies who can put individuals on top of different parts of the process. While full stack people tend to get hired at tiny companies who need you to do...everything. On one salary.
So, I probably didn't resolve the issue, but it's not supposed to be resolved. As long as one hand washes the other, we will have all different roles to fill, and what kind of challenges get us to work on time will make a difference in what kind of role you take on in life.

*Caveat: neither question will get you laid this weekend. Just FYI.
**With a little help from the back-end champs who consider you a hack, miserable fruit, or worse. Good communication matters in the workplace!
***Photoshop is the undisputed champ for this, but you might want to consider Inkscape, which is an outstanding drawing and design program that exports to Canvas HTML and CSS files. It's not an easy program to install and learn, but it's worth it. Hmmm, maybe I should do a Inkscape tutorial here? :)


Shop Gaiam Yoga

Comments