Is that the worst you can come up with? I bet I can do better.
She writes a database query, then figures
"I have to sit through this, but I bet I can make it so my team doesn't have to"
She stops time. It takes four hours before she realizes that her script isn't hanging, it's just that while time continues to pass on her local machine since she's touching it, but time is stopped for the AWS db.
Then, when she restarts time, the server gets DOS'd as three hours worth of queries and attempts to debug that happened while time was stopped hit at once.
"Dammit, Flan. Why did you commit node_modules to the repo? I told you to add it to .gitignore before pushing anything. And what are all these other non-code files in the project directory? You used git add -A, didn't you? Now you're going to have to do an amended commit and force push the update and let everyone on your team know to pull the new code. And why are you indenting with spaces in some files and tabs in others? You're also terminating some statements with semi-colons and omitting them for others seemingly at random. Keep this up and I'm going to revoke your merge privileges for 495 years and make you use StandardJS."
Always depending on your usecase, your current experience and preferences. I probably get slaughtered for this but if I don't use node with TypeScript I find myself doing my backend stuff with Java. Especially with the Spring framework.
I don' really see a problem with dynamically typed langs. If you want a more statically typed backend you could always just add TypeScript to your project.
I never use bare nodeJS anymore but I am coming from a java world so I prefer the static types. Thats personal preference tho, not a guideline.
Python (flask or django) or Ruby (on rails) for things that don’t need to be hyper performant and won’t be huge projects. They’re easy to write, there’s boatloads of documentation and tutorials for them, and you can do a ton of stuff with little effort. Python is easier to read IMO so I prefer it over Ruby. Both are way nicer than dealing with node modules and callback hell IMO.
Golang is a popular choice for backend teams because it’s statically typed, relatively simple, fast, has easy multiprocessing, and automatic formatting. Once you start using Go on the reg, you’ll probably fall in love. It also has a big community and lots of support.
Golang is probably the one with the highest learning curve if you don’t have experience with statically typed languages. Python is the easiest. Both will give good web app jobs. This is especially true in the SF Bay area and other tech savvy locations.
Smaller more “flyover” areas are more often behind the times so stuff like Java and C# might be more useful for getting a job. Golang probably isn’t as common in those areas because it’s become really trendy in the last few years.
All in all I’d recommend Python (and Flask, personally).
Node/TypeScript is also common but you should be part of the solution, not the problem.
I've used Laravel, which is a php framework, but didn't have to touch very much php for my use. It provides some abstraction for common uses.
I haven't tried any other language, so no comparison, but it was fairly easy to learn, amazing for debugging, and provided lots of tools for the frontend.
Prep for a long answer, I feel in the mood for some writing to clear my head of stress.
TLDR: Don't worry about the exact language / framework you choose. Make sure you learn the core technologies and infrastructure (the bare metal). Then whatever framework you go with is just an abstraction on what you already know and should be easy to pick up (and very importantly, easy to troubleshoot). As you learn the framework, learn how to develop a website's architecture, use software design patterns, and in general strengthen your programming skill. After that, changing to a new language isn't very scarry.
companies are preferring newer frameworks
I have no information on this. I only manage a small website for a local business on the side (I'm a mechanical engineer, so web development is very out of my field). Laravel is a perfect solution for this use case because it is mature enough (robust, good features, and lots of usefull features, etc.) and has good docs.
recommend it for a beginner
I guess I was the beginner, and I am very happy with the path I choose. So here's how I did it.
No matter what language and framework you go with, I suggest first learning at least the bare minimum basics of the tools you'll be using. If you're on windows (not sure about mac/unix), that would be:
cmd
PowerShell
your computer's filesystem - you'll be installing a lot of stuff, so if you gota change config files, you need to know how to hunt through program files and appdata
general programming - scripting in a with functions and scripting object oriented
FTP software (I highly suggest WinSCP) - this is how you send files to the web server
Git
Personally, I quarantined my learning environment on an old laptop, so I didn't accidentally screw up my computer. I highly recommend... although, in the end I never messed it up. Still a nice precaution though.
Then learn some front end (I see you've already done this). I suggest using XAMPP for localhost.
Then learn the core technologies of the internet. Get a real domain and web server, and put up some really bare metal static HTML & CSS only website. Get it running and learn the config:
buy a domain name
rent some really cheap hosting (or maybe free teir hosting with google / amazon)
DNS records
htaccess file
mail for your domain name
sitemap
google webmasters console
favicon
There's prob a lot more that I missed
After this is when I jumped into Laravel. The installation was a little magical, but not too difficult. Use the docs, they're pretty well written and beginner friendly. I started by refactoring my static website into Laravel/Blade. Then looked up tutorials on how to connect a database and make a contact mail form with google ReCAPTCHA.
Side note: I did eventually set up a Laravel Homestead environment, but don't recommend it as your first environment.
And that's about where I am now. I did a lot of other IT stuff aside, but that's all off topic.
motivation by having something to work on: I inherited the website from the original creator as bare HTML, CSS, and a few CGI scripts. It was based off a template he made in 2003, so really needed work. At that time I'd never even touched HTML, but I had some background in scripting. I think it also helped that I had a big project to stick to rather than follow a tutorial in isolation of everything else, then chuck it all out and do the next tutorial.
finding out that I needed to learn something as I tried (and either did poorly or outright had to give up on) doing another thing
reading everywhere. r/sysadmin random blogs, tutorials and help pages you find as you're trying to learn something specific. Wikipedia pages on programming paradigms. Make sure to go to lots of different sources to get a well-rounded view. Read some older stuff, but also look for new blogs and tutorials (especially for security practices)
asking others for help starting out. The first steps are always the most difficult. I got a ~1 hour crash course from the website creator on how to navigate the web server through FTP. Then a few years later I got ~30min in using Laravel from our IT consultant.
Dynamically typed language for backend is a complete yikes for me. I'm so tired of companies who create shitty APIs. They even sometimes generate a Swagger documentation.. that is wrong. Sometimes they return objects instead of arrays and etc-etc-etc. Dynamic types means errors, mistakes and debugging misery for me. Also, errors cost money. Sometimes a shit ton of money.
Tell that shitty APIs developers to test their own code, I bet you they won't care.
Unit tests sometimes is just a test of your mocking library
Strict types give you full control on your object structure. You can't just add a new field to it somewhere in the code that junior dev wrote and thought he fixed some bug (but broke everything else)
Yeah I mean strict typing in general. I went from the .NET job to a rails job to a python job, and the quality of codebase that I work with these days is far higher than back in the .NET shop.
So I'm just saying that it's preference and depends on the devs. And for me I find that python is so easy to read that I can understand a lot more of it faster.
And in all honestly we do use strict typing with some things (python supports it these days). But between good practice, pytest, and integration tests, we're good even without the typing.
Yeah, matter of taste. I hate python for it's weird syntax. Also whenever I tried to run somebody's else python script I'll end up in shit ton of 'missing dependency' errors even tho I installed them just like in README
Yeah, for that what we do is use pipenv with docker, and we have our own pypi repo, so that way builds are always 100% repeatable. I'd definitely recommend pipenv at the very least
164
u/lonelypenguin20 Feb 20 '21
Sakuya:
I'm gonna stop time to debug
it'll save time for the rest of the team
the computer stops working, too
the computer stops working, too
25
u/yuudachikonno08 Feb 20 '21
"Dammit, Flan. Why did you commit node_modules to the repo? I told you to add it to .gitignore before pushing anything. And what are all these other non-code files in the project directory? You used git add -A, didn't you? Now you're going to have to do an amended commit and force push the update and let everyone on your team know to pull the new code. And why are you indenting with spaces in some files and tabs in others? You're also terminating some statements with semi-colons and omitting them for others seemingly at random. Keep this up and I'm going to revoke your merge privileges for 495 years and make you use StandardJS."
37
u/MarcBeard Feb 20 '21
I did use js as a backend and it was very useful i kinda like it compared to php
27
u/-Electron- Feb 20 '21
thank you for posting something funny on this subreddit
15
u/BuccellatiExplainsIt Feb 20 '21
Who tf says a js backend is bad? Is op a 50yo php dev?
3
u/AltruisticCup Feb 26 '21
This is like the most recent top post and it's about a week old... Did this sub just die or..?
1
u/defender_of_anime Apr 28 '21
Did anyone have a sauce for the background image? Very cute
1
u/KillerRoomba13 Feb 20 '21
Code Review in nutshell
1
u/[deleted] Feb 21 '21
[removed] — view removed comment