I don't know if it's possible to get a good answer to this but: if you learned how to make websites with, like, users who can login and do things where the website stores stuff in a database, without doing it as a job, how did you do it?

I feel like in principle I know all of the basic pieces (HTTP, HTML, CSS, SQL, CORS, various programming languages, etc), but also somehow it still feels extremely hard to me

(no more replies please there are enough)

@b0rk I played around with it until it worked. But when I started professionally there's a lot I learnt that only applies to bigger projects
@b0rk by doing it badly several
times, then less badly
@philnelson @b0rk so, "good judgment comes from experience; experience comes from bad judgement"?

@b0rk

You would have to give that user subsequent administrative rights/ access.

@b0rk I took the coward’s way out and used .htaccess for logins. The rest of the site *does* use a database, so I have that part figured out, much of it by trial and error. It’s the login and checking every time they go to a page to see if they’re still authenticated that has me flummoxed. This is one of those places where a framework like Flask might really have come in handy.
@b0rk from online tutorials and the php documentation in ~2000.

@janl @b0rk I sometimes think if I were starting out now, it might be much more difficult.

Back in the day, it was easy-peasy: shared hosting with PHP, database, and FTP access. I’d just upload files, see what worked and what broke, rinse, repeat.

@ramsey @janl i'm not sure I'll ever understand the "it was so easy to develop with PHP + FTP" thing, it kind of feels like you had to be there

(it sounds hard to me, like developing with no version control?? no push to deploy? no local dev environment?)

@b0rk @janl You asked how I learned. 😁
@ramsey @janl absolutely not trying to criticize! just a bit surprised to hear it described as "easy" :)
@b0rk @janl All I had to do was focus on the code. I didn’t have to learn those other pieces at the same time, which, to me, would have been pretty big hurdles. There were very few moving parts, so to speak.

@ramsey @b0rk @janl Yep. Edit a file in notepad, drag it to the server in WSFTP or CuteFTP, and your changes are live.

I wasn't as much of a fan of developing apps with DBs and logins that way, but it was still eminently possible.

@ramsey @b0rk @janl for the more complex systems, i liked Allaire HomeSite (later purchased by Macromedia/Adobe). It allowed me to configure one-click FTP site deploys directly from the IDE.
@kboyd @b0rk @janl I used DreamWeaver. By then, I was working for a company, but we still didn’t use version control or any special deployment systems.
@b0rk @janl It might help to understand that I never saw myself as a programmer. It wasn’t a career I ever expected to pursue.
@b0rk @janl I suspect there’s a large number of folks who accidentally became professional programmers in the 90s and early 00s, and I wonder if that’s something that could be replicated today, or was it unique to that time period?

@ramsey @b0rk @janl

Yep, that’s me as well. I taught myself as teenager when I was in secondary school.

Even after school I didn’t want to do this as a career, but studied physics and chemistry. Tried for over a year to get a job in that field without success before I considered doing software development as a job. Sent out a single application for a job as web developer, got offered that job, and decided it must be a sign.

That was 20 years ago. And I’m still doing software development.

FWIW, my kid (11) is super interested and is teaching himself all the same stuff in much the same way.

First JS/html/css, then Kotlin. Now he’s spent the last few days battling with a raspberry pi to set up a SQL server, and is determined to learn sql.

But not sure that alone will lead to a professional career: he’ll have to study something related if he still wants to pursue this as a career in a few years time …

@ramsey @b0rk @janl This! Tooling is insane now, compared to "then". We discuss this often when taking on students.
@b0rk (I also learned this around the same time as @ramsey and @janl) it was easy in the sense that you just edited a file and copied it up (or edited live on the box!). You didn't *have* to think about version control or push practices because the discipline was in its infancy and those things were not super common. It would have been more difficult to do those best practices because they were not common.
@b0rk @ramsey @janl it was easier then also because it was essentially just simple HTML, maybe a dash of CSS and only if you were fancy, some JS. All those things were smaller in scope than today. On the server side it was just PHP and some kind of SQL database. All so much more grokkable than the fullest of the full stacks that folks deal with today. I think that modern webdev is dizzying in its complexity; it's very intimidating compared to what it once was. Much harder to get started today!
@wez @janl I'm in the same boat. Even as someone who's been doing this over 25 years, I'm intimidated by the level of complexity. I've adapted to it, of course, but I try to stay away from front-end as much as possible 😅, and I know some of it is for the better: things that @b0rk mentioned, like VCS, deployment practices, local dev, etc., I take these for granted now, but none of these were well-established when I was starting out.

@ramsey @wez @janl @b0rk It is impossible to overstate the extent to which today’s common web stacks are designed for solving Facebook and Google’s problems. Everything is so complex in part because the tools have been architected for a scale and context that is irrelevant to nearly every project that uses them.

We’re all subsidizing the biggest companies in the world.

@nick @ramsey @wez @janl I picked the stack for my current startup and doing things the reasonable way (introduce complexity as needed, multi-page app) it's great and we're productive but we're hiring senior devs and they only know react and react-likes. Theres a risk in doing things this way because it's no longer mainstream and that blows my mind.
@ramsey @wez @janl yeah, I was pretty proud of myself that, whenever some new feature worked, I did a backup of the sources in a zip file :D
@wez @b0rk @ramsey @janl editing live on the box was the ultimate repl
@zan @wez @b0rk @janl Imagine if WezTerm were an FTP client. 😉

@b0rk 😂 Yeah. "designers version control" with .bak and .bak.bak, a "local" dev environment with an editor directly accessing files via FTP, var_dump debugging on prod and when you were serious, your stage was just in a different folder....
Deoendency management? DB migrations? CORS? CSP? XSS? what's that?

It was slightly different than today. And shows how much we take for granted within one generation....

/cc @ramsey @janl

@b0rk @ramsey @janl Worth noting: the version control *sucked* back then. We take a lot of that for granted now because it works so much better, despite being much more complex.
@sean @b0rk @ramsey very good point. I once spent a week(!) merging two branches in SVN.
@b0rk @ramsey @janl I think you’re making it difficult. Imagine having nothing like these set up, so you have nothing. Then the easiest to do is to upload a file and see in the browser what it does. All these extra steps you’re mentioning need to be set up and configured correctly before you can do anything. Later on there was also #WAMP and #LAMP so you could test the file before uploading. #php

@Hipska @b0rk @ramsey @janl Also, don't forget there was no package managers, no compilation steps, etc.

At best, you use PEAR to add packages and it was inlcuded in the source folder you uploaded. Just update the code and refresh the browser and you got an error, or not. Worst of all, a white screen.

Heck, you often didn't even have logs! Certainly none you wrote to yourself, it just wasn't a thing. If you were lucky you had access to the PHP logs for your vhost.

@b0rk I don't think it was "easy", but "simple". A system with very few discrete actors and almost zero relationships among them. The complexity of that system was as lower as it could get. Doing things well and avoid massive mistakes working that way was extremely "hard". @ramsey @janl

@b0rk It kinda became a job, but wasn't when I read Learn Python the Hard Way and Two Scoops of Django.

I think I get what you say about knowing the constituent parts... "but then what?!". I guess the way to go is to not be so concerned with all the nitty-gritty stuff (until you actually *need* that depth). Like, why design authentication from the ground-up when you get it for free with $FRAMEWORK?

@b0rk I want to add that I think the web dev beat is very very very hard to follow. So many new things, like, say, "what's bun even? do I need it?"

The fact that I'm struggling to concisely describe what I'm confused about is very telling. But basically JS build pipelines. Wanted to call it "frontend code", but there's stuff like SvelteKit and Nuxt now so that's actually not true...

Luckily I'm not in the customer-facing end of things but I tend to stick with htmx/alpine for web2.0 behavior

@b0rk i got a book about making a website in php in like 1998 and just typed in all the examples i think

@b0rk I bang my head against things until something happens. Databases are scary so I dealt with MongoDB first...then ran into issues so I moved to RethinkDB because it had a UI where I can see my data if I fuck up. Ran into issues with an ORM so I moved to EdgeDB. They have an actual business model and also have a UI and are fantastic.

I hate SQL. I'm a person, not a computer. I'm not learning that syntax, ever. I steadfastly REFUSE.

EdgeDB is great, I'm a fanboy for life.

@b0rk My backend stack also includes Deno and GraphQL. I don't use Apollo, I use .graphql files and the official GraphQL module.

@b0rk

If I remember correctly, my first non-work site that enabled login and content edit was PHP and CouchDB (that is, a document database) which enabled reasonable content submissions and update and whatnot, simple user accounts (documents…) and basically “easy” starts… this was a reasonable way to learn about the things that would be easier if __ and so on.

Not secure, not something I would hold up as an example, but a good learning experience for me.

Almost right after was work PHP+PG…

@b0rk

(I haven´t used PHP for anything since, this was around 2005)

@b0rk I took it on me to run our teenage Unreal Tournament clan website in the 90s and it kind of escalated from there

@b0rk I made a bunch of websites with Django. It's great that it gives you all of that infrastructure for free, but I still had to read a lot of tutorials to understand basic concepts.

I think what makes it hard is there are just _so many_ pieces that have to come together to make a complete website on that stack.

@b0rk IIRC I wanted to use the Slashdot software but couldn't afford Perl hosting. This was around 1999-2000 so simple things like WordPress didn't exist yet. Mostly trial and error, to scratch a personal itch.
@b0rk honestly I think most of my best learning comes from itch scratching, whether for work or not
@b0rk still ruby/rails/postgres probably just due to familiarity
@b0rk I usually started by modelling the data I’d need to store and how the various types of data were related to each other and build a starting schema for the database, then add some backend scripts for CRUD against that database, and then finally a frontend that called the backend scripts as appropriate. but, throughout, bouncing back through the layers to add or modify bits of the data structures as I realized I’d missed things in my initial evaluation. (when I was teaching myself, this was using perl and mysql on the backend. now I’d lean toward PHP and postgres but my process wouldn’t be much different than it was 30 years ago)
@b0rk this is a topic on which I think a lot. I was lucky enough to learn all this when all those technologies were much less sophisticated (and sometimes they just weren't there at all); so it all went in a gradual and slow paced way. But I often ask myself how a young person could approach all this huge amount of complex things all at once. I often see juniors dev struggling a lot to wrap their mind around modern web development and don't really know how to help them.
@b0rk I learned it as a hobby for my blog, though I'd learned some bits of HTML and JS elsewhere.
@b0rk I wouldn't claim to be good at it, but just following the Django tutorials was enough for my purposes.

@b0rk started with only javascript, then learned perl and how to use it as a cgi-script using the file system for storage, then learned about postgresql, then learned about frameworks like django, then got into node.js where you implement the entire server (the most fun!)

it was a very roundabout but inclusive journey for me that happened at the same time as learning to program. if you're learning it now, you can probably take a much more focused and effective approach.

@b0rk in a way, the nodejs (and equivalent approach where you write the entire server) is the most advanced, yet also the most simple since you make the rules. you want a framework, sure, go ahead and depend on one. that sounds hard? then just roll your own logic. it's super fun

@b0rk Way back when I first made dynamic sites (for my own entertainment, back in like 1998), things were simpler. It was mostly perl, with html sprinkled on top, and a very basic understanding of http.

I learned how to write CGI scripts in Perl from the scripts shared by people on the IRC channels I hung out on, and from various Perl man pages. Perl man pages were fantastic resources.

They were very bad scripts, mind you. Every single line of them could be shown today as an example how not to do things. But! They got the job done at the time.

@b0rk I bought a PHP book I saw at Barnes & Noble, and worked through it end-to-end, drawing from php.net as I went.

https://www.amazon.com/PHP-MySQL-Web-Development-Second/dp/067232525X

Then a webcomic artist friend asked me to write a website for them!

Amazon.com

@b0rk

Well, I wanted something done. For me this "I want it, and I believe I can get there, even through sweat and tears and everything" is like the best learning experience.

Then try, think, read and talk to other people who are slightly farther on the journey. That's what worked for me.

And do it step by step. Test after every step. Understand every step. Don't take shortcuts unless you really understand them.

That's MHO.

@b0rk I dicked around with CGI scripts in Uni back in the day. But to be fair, best practices then were far removed from what one needs to do today. Certainly no CORS or anything like that!

I brought myself up to speed with what's needed for a Modern web app professionally. Funnily enough, it was bringing a legacy CGI-based app up to speed with modern best practices.

@b0rk Back in 2006ish a friend sent me a book called "Building websites with PHP4 and MySQL" (or something along those lines). And I started building. I didn't have a job so I built something that a friend needed. I learned things along the way, like proper indexing of DB tables, etc... It's always felt hard, and it's still hard, but sticking to the most mainstream technologies and not getting lured by shiny objects is a sure way to make things easier.
@b0rk It was more complicated than this in reality for me, but, basically, install XAMPP in Windows and do some "basic mysql with php" type tutorials on the web and just build on that. I basically did that but with more steps.
@b0rk at one point, I learned django. It give you the glue to hold all the spaghetti together
@b0rk when I used to do it, which was highschool, I just picked an apache server and put php files on it. Through copying other stuff, templates and things I found I started building the basics. And I'd say now it's harder to find these things, because there's so much boilerplate around web development, usually oriented at huge web apps such as js frameworks

@b0rk I don't quite understand (not a job throws me off)
my first web site was on uni lan me doing my first thing with python (very old python)
[totally forgot about server side of web for years]
develop new web site with user auth from scratch; I knew about saltcrypt pw, no idea about cors or csrf back then (had to look up csrf because something warned about it.)

I can't tell what feels hard, making it user friendly or making it secure, or something other.