kwedd

joined 2 years ago
[–] kwedd 1 points 2 months ago (2 children)

Nobody creates a website completely from scratch. If the point is to learn, then by all means, go ahead and implement everything from scratch. That'll be very educational. However, assuming the point is to deliver a working solution to the travel company this year or next year, you're going to want to use existing libraries and frameworks to do some of the heavy lifting, organize your code and make your life easier.

There are more or less two ways to implement a website that is not just a bunch of static HTML pages, though in practice a lot of websites will fall somewhere in between these two extremes:

  • Classic: The server generates a page based on the information in the URL or a POST request (usually when submitting a form). The server returns a bunch of HTML, CSS and maybe a little JavaScript. The contents of the page doesn't really change after it's been sent to the client (the user's browser). This is useful for webpages that aren't very interactive, like a CMS or a blog.
  • Single page applications: The server sends almost no HTML. Instead, the client retrieves data from the server, usually in the form of JSON. Once the data has been retrieved, the page is generated in the client using JavaScript. Parts of the page can be modified based on user input and further queries for data. This is useful for webpages that are very interactive, like Google Maps, for example.

Single page applications, while popular and hip nowadays, are overkill for a lot of websites. They are also an advanced topic, that requires you to have most of the knowledge involved in the classic approach. Therefore, I will mostly discuss the classic approach in this post.

Any website is going to have code and markup that is sent to the client and code that runs on the server. For the client side you'll need to learn:

  • HTML - A markup language that defines the structure and contents of your page.
  • CSS - Style sheets define the look and layout of your webpage. Things like colors, positions, borders, simple animations, whether text is bold, italic, etc.
  • JavaScript - A programming language that runs in the browser. This might be used for animations and effects, changing parts of the webpage through DOM manipulation and validating (checking) user input in a form.

For the server side you'll need to learn:

  • A programming language - The possibilities are endless here. You could use almost any language. Some popular options are PHP, JavaScript, ASP.NET, Python and Ruby. Apart from personal taste, which one you choose should probably depend on what libraries, frameworks and existing solutions are available for the problem(s) you're trying to solve.
  • A relational database and SQL - You'll want to store your data in a database. Use a standard relational database like MySQL/MariaDB or PostgreSQL. If someone suggests using a NoSQL database like CouchDB or Mongo, ignore them. You'll be talking to your database using some variation of SQL and/or an ORM. Also, you should learn about database normalization.

To organize your code on the server, learn and use some sort of MVC framework like Laravel, Symphony, Django or Ruby on Rails. This will help keep your code clear by separating the template (view) from the code that talks to the database (model) and the code that processes that data (controller).

I imagine a travel agency might need:

  • User authentication and rights management - This allows for the creation of users, allows users to log in to your site and manages which users can do and edit what. Since you don't know what you're doing, use an existing library/framework/solution for this. Otherwise you will get hacked.
  • A content management system - This will allow users to create and update pages using markup or a rich text editor, as well as uploading images and such. I highly recommend using an existing solution for this like WordPress, Drupal or one of the many others.
  • Some kind of blog or timeline with news and updates - Again, I'd suggest using an existing solution like WordPress or just embedding the company's ~~Twitter~~ X (or Bluesky or Mastodon) feed.
  • Some kind of booking system - If the travel company only organizes a limited number of group trips or whatever at set dates, you might consider implementing this yourself. Just let the user select a trip/destination and a date, enter relevant personal information and let them pay through some kind of payment service like Stripe. However, if the user needs to be able to create their own itineraries and book flights, hotels and rent cars and whatnot, things are going to get a lot more complicated. This would require a much more interactive page and would need to interface with all kinds of other parties, like hotels and airlines. So in that case you'd be better off using an existing solution.

Regarding general programming knowledge, of course you'll want to learn the basics like variables, conditionals, loops, functions, objects etc... Beyond that, I suggest you also look into design patterns. These are commonly understood ways of solving different programming problems. I recommend learning patterns from both object oriented programming and functional programming. IMO you should use immutable data and functional programming whenever it's not too much of a hassle and performs well enough. If you do need mutability or statefulness, use objects and OOP patterns.

Furthermore, at some point you'll want to learn the basics regarding data structures and computational complexity and big O notation. As far as data structures go, in practice you'll mostly use lists/arrays and hash-maps/dictionaries. It's good to know how fast different data structures perform different operations like inserting/removing elements or looking up values. You'll want to know the computational complexity of these operations. You'll also want to be able to know the computational complexity of the algorithms you create. For example, if a function needs to look at all the elements in a list once, it needs to do n steps and the computational complexity is O(n), where n is the length of the list. If a function needs to compare every element in a list to every other element in a list, it needs n * n steps and the computational complexity would be O(n^2). The latter would get slow very quickly on long lists.

If you find yourself writing a lot of JavaScript, consider using TypeScript. While adding types to your code will seem like a hassle at first, in the long run it'll catch a lot of problems at compile time and make it easier to debug your code.

Some people might suggest using the jQuery or Underscore libraries when writing JavaScript. While both were very useful at some point in the past, nowadays most of their functionality is included in modern JavaScript. This makes them mostly redundant unless you're targeting really old browsers.

[–] kwedd 4 points 2 months ago

Comedy:

  • The Young Ones
  • Red Dwarf
  • Bottom
  • The Office (UK)
  • Coupling
  • Peep Show
  • Little Britain
  • Roseanne
  • 3rd Rock From the Sun
  • Futurama
  • 30 Rock
  • Arrested Development
  • Broad City
  • Joe Pera Talks with You

Science Fiction:

  • Star Trek: TNG
  • Firefly
  • The Expanse
  • Battlestar Galactica (2004)
  • Travellers
  • Real Humans/Äkta Människor
  • Foundation

Drama:

  • Six Feet Under
  • Breaking Bad

Anime:

  • Golden Boy

Dutch:

  • Rembo & Rembo
  • Zaai
  • Dunya & Desie
  • Jiskefet
  • All Stars
[–] kwedd 14 points 2 months ago

Should've stayed on the bus. Never let them know their disguise doesn't work on you. Now they might be coming after anon.

[–] kwedd 8 points 2 months ago (2 children)

Gestoord. Zo doet alsof mensen een misdaad begaan door hier asiel aan te vragen.

[–] kwedd 5 points 2 months ago (2 children)

If you're not trying to make money, wouldn't it make more sense to start a non-profit foundation?

[–] kwedd 4 points 2 months ago

Code Monkeys

[–] kwedd 53 points 2 months ago (1 children)

I was really amused until I realized this is not an Onion article. What. The. Fuck.

[–] kwedd 2 points 2 months ago

I could take or leave tofu, but I really like tempeh.

[–] kwedd 1 points 2 months ago* (last edited 2 months ago)

There are some large, internationally oriented companies where you can get by speaking only English. I've also seen more than one tech company hire programmers that don't speak Dutch. So it depends on the industry.

If you want to get some perspectives from Americans living in the Netherlands, you could check out Itz Sky's and Jordan Green's channels on YouTube.

[–] kwedd 4 points 2 months ago

Things aren't much better in The Netherlands. The PVV is part of the government now. The good news is that having to form a coalition with other parties, seems to have reigned in some of their worst tendencies. Also, their minister of immigration is a total nitwit that can't get any sort of actual policy implemented. If they keep failing to make any kind of progress on this issue, hopefully they won't do as well in the next election.

[–] kwedd 4 points 2 months ago

The party is called the PVV. Their racism is mostly aimed at Muslims, but they're not a big fan of most other groups of immigrants either. Highly educated expats with a work visa largely get a pass, though I think there are some plans to limit their benefits.

[–] kwedd 18 points 2 months ago (11 children)

The Netherlands, Germany and Scandinavia have all those things and people tend to speak English really well.

view more: ‹ prev next ›