How did you learn web development?

I started learning JavaScript a couple weeks ago, and it was going really well until I started getting intrusive thoughts like “I should read the SGF docs” or “maybe I can learn something from studying the BesoGo code”.

These seemed like perfectly good ideas at the time, but as soon as I opened up a Go-related GitHub page and read a couple lines of code, I’d be consumed by an overwhelming desire to play Go, and get nothing done on the programming front.

Reading projects about Go seems like it would be an amazing way to learn but I just have no self-control :sob: what were the things y’all found most interesting when you were just getting started with web development, or with programming in general?

(also hi it’s been awhile)

12 Likes

I read books (such as Amazon.co.uk and Amazon.co.uk, but these are 20+ year old recommendations; Crockford’s JavaScript: The Good Parts[Book] is still a valid recommendation). Other people’s code is unlikely to be good instructional material, particularly if it is their hobby projects quickly bashed together with no intention of being easily to follow or a paragon of good coding style. These days video courses could also be good. I found working on my projects with real goals to be interesting and a good motivation with qualifiable success. For example I made a personal homepage on ntlworld, a program to create track listings for my ATRAC format Sony CD walkman, a keylogger to hack my school’s network (:imp:), and a bouncing ball simulator. Oh and don’t use w3schools, it’s not as bad as it used to be, but MDN is better. And stackoverflow, if you’ve not yet discovered it (it didn’t exist when I started).

7 Likes

I learned by making BesoGo, which also involved reading the SGF docs.

I also found reading Crockford’s “JavaScript: The Good Parts” to be very helpful for learning JavaScript. It’s still very good despite being out of date on new language features.

For programming in general, I’ve learned a lot by trying to do things and lots of googling to figure out how. Nowadays, I think ChatGPT and/or GitHub Copilot are both really valuable tools for learning and doing. For learning, I recommend trying to use these like a more advanced form of googling, such as by asking questions and seeking explanations, rather than just requesting code generation.

I think that looking at other projects can be helpful, but I recommend not getting too bogged down in trying to understand some confusing project and instead aim for looking at a lot of different projects, trying to understand and learn what you can. I say this since there is a huge variety of coding styles and quality. In a lot of cases, while some code might work fine, it might also be written quite poorly, difficult to understand, and in a manner not worth imitating. There can be many different ways of doing things, and it’s good to get broader exposure to different techniques, patterns, and tools (like studying a variety of joseki, tsumego, and tesuji).

BesoGo probably has a somewhat unusual coding style. It’s a bit out of date, not using the more recent version and features of the language. BesoGo has a somewhat strange way of representing the game tree. Rather than a more straightforward and self-explanatory object-oriented manner that could easily be translated into another programming language, BesoGo takes advantage of the particular way inheritance is handled for JavaScript objects. BesoGo is maybe also a bit perculiar for using a coding style that avoids declaring classes and instead build objects using factory methods and closures to encapsulate private member variables.

If you have any questions about the implementation of BesoGo, Josekle, or Fusekle, I’ll be happy to answer them.

7 Likes

When I started programming (around 1982 when I was 13 and the internet wasn’t a thing yet), books were basically the only source to learn programming. And those books were even hard to come by and expensive.

In the beginning I was just tinkering with small example programs, and from there I started making small text based games like tic-tac-toe and hangman.

I think there is not really any other way to actually learn programming than to just do it and keep doing it. You need to spend a lot of timing tinkering and messing up. In that sense, improving at programming is perhaps not very different from improving at go.

I program for a living since the year 2000.

6 Likes

Find a feature you really wish was on OGS and try to add it yourself :slightly_smiling_face: many people learnt this way :sweat_smile:

7 Likes

What sorts of projects are you interested in making?

3 Likes
3 Likes

I started contributing to OGS a little after I started my first web job. It’s a great way to learn! Big enough that patches feel meaningful, but small enough that there are still low-stakes features to hack on. And anoek and team are very supportive :slight_smile:

(Pre-Go obsession) fractals, games, and esoteric languages

9 Likes

I’ll check that out! When I googled it I also found some other cool-looking recommendations.

This is a wild range of projects :joy: did anything ever come of the keylogger at your school??

I like BesoGo! The only problem is the aforementioned one of getting too inspired to play Go whenever I look at it :see_no_evil:

I don’t think I quite yet understand what this means, but I hope I will soon!! I picked BesoGo because i wanted to see an example of how other people parse SGFs. Handling text objects seems so complicated to me… Why couldn’t it just store games in a JSON-like format?? So many questions :exploding_head: (i’m sure there’s a very good, obvious reason - another thing i’m excited to eventually be able to understand lol) I will probably be asking you BesoGo questions down the line!

3 Likes

Oh gosh, there are so many things! I want to make a website for my piano teaching, I want to make a program to play a very specific, weird variant of Go that I think might be a solvable game, ideally I’d like to train a neural net so I can see what high-level play looks like for it… There’s a lot I’m looking forward to doing.

I’ve already made some little things that I’m really happy with, like this Chrome extension for YouTube Live chat that checks whether a message is written in Toki Pona, and formats it accordingly. It’s sort of ridiculously niche, since there is only one streamer whose chat is mostly in Toki Pona, but he said he might even use it for his next stream, which is pretty cool :slight_smile:


I made a Toki Pona chat overlay for Twitch, too…
image
…but I don’t think anybody will use it but me :sweat_smile:

(I’ve been kind of obsessed w/ toki pona recently if you can’t tell). Basically all the projects I can think of that I want to make are somehow either Go or Toki Pona related.

I’d LOVE to buuuuut it’s intimidating… if I stick with it though, I’m sure I’ll get there >:D

These projects are really cool!! And extremely mathematical-looking and over my head :grin: I’m reading up on brainfudge and it is really something. This got me googling and apparently somebody has made a toki pona programming language :eyes:

7 Likes

Thanks for sharing about toki pona. You seem to be involved in so many interesting activities now (not forgetting go ofc)

2 Likes

Yes, got the admin password when they logged in to a computer in the library, then got the master password file for all users and cracked that with help from some friends, and for April fools made a program which changed the icon on the login screen to a winking smiley face and made the OK button run away from your mouse when you got near it. That all worked perfectly, except the school admins hadn’t set up time syncing so some of the workstations had the wrong date so didn’t trigger, so in a rushed attempt to fix that we ended up making a mistake in the time sync login script which made some of them crash on startup. A valuable lesson against trying to fix things in hurry without testing, particularly where the defect your are fixing is minor compared to the potential damage you risk if a mistake is made. And no we didn’t get caught.

10 Likes

I do not think that I ever learned, in a sense of remembering. My way of doing things requires only two components:
a) What needs to be done?
b) What language has been asked/required/needed?

Once you know that, you can dive in to learn the things that you need, thus avoiding other distractions. The immediate need for application makes you avoid “tutorial hell” or jumping around from project to project or getting sidetracked to other things.

Optional tale

Once - has it really been more than 10 years? Time sure flies :confused: - I was asked to make a cross-platform mobile app for both Android and iPhone. At the time I didn’t have an Android (but I had seen one) and I had never even seen an iPhone in my life, let alone used one (which is still true. Noone has an iPhone here).

So, I set out to learn how Android works.
Then I learned how the iOS works.
Then decided that making two apps might not be very optimal (especially considering the difference in architecture between those two operating systems), so I chose to try a “combo tool” where you program it in one way (its own language of choice) and it automatically outputs two different “native apps” for those two systems.
So, I looked around, chose what looked best and learned entry-level stuff on how AppCelerator Titanium works and set up to make a test app. Downloaded some emulators for Android and iOS and off I went. Once that worked, I had established that this language could do what was needed and I had a test environment that was working, so I set out to learn more of it and how to implement that “things that needed to be done”. And then tried them out till everything worked.

I do not remember a single thing now, of course. So, did I “learn” anything?
I do not know. I do not have any talent in remembering, only in adapting. More recently someone wanted a complicated WordPress plugin with cookies and at the time I had no demonstrable knowledge in PhP, WordPress management or JavaScript. The plugin was completed with a similar process. If you ask me now “do you know/remember anything about those things?” the honest answer, even after a few thousand lines of working code without bugs, is “no”.

So, this is my “advice”:
Determine what you need to do, decide the languages needed, focus and learn what is relevant, complete the task. Optional final step: Proceed to forget all about it :stuck_out_tongue:

I should get to learn Unity or some other similar platform one day and make a couple of game ideas that I have, but who has time for all that? What we really need is a store that sells free time.

5 Likes

When you have an idea of something you’d like to do on OGS, hit me up, happy to help.

7 Likes

I think that this might be a good starting project that you could do in any language and platform you like: convert an sgf file to json format. It would avoid all the complicated and time consuming UI stuff that you’d need to build when making a fully fledged sgf editor.

7 Likes

Fun fact: SGF predates JSON by over a decade :smile:

There are probably some areas where SGF is technically superior to JSON, but there’s no reason you can’t store Go games in a JSON format (OGS does)

Related: @hexahedron’s ogstosgf script, which does the reverse

7 Likes

I’ve learned programming in (something like high) school starting with C, which I used to program a version of snake. In the second year we did pure HTML/CSS/JS (no frameworks). Based on that I wrote some user scripts to better manage my empire in a browser game I was playing at the time.

Then you might want to check out GitHub - govariantsteam/govariants: A place to play Go variants :smile:.
It definitely has room for more weird variants, or you could just use it as an inspiration. Unless you want the experience of building your variant from scratch on your own, which is also valuable.

I’m also happy to answer any questions. Welcome back. :slightly_smiling_face:

7 Likes

I’ll be sure to! Every idea i’ve had has seemed really complicated, so maybe the first step is learning the basics and developing confidence :melting_face:

I’ve decided to start working on this today!! I’m struggling to understand some of the language used on red-bean describing ‘grammar’ and ‘specifications’, it all seems a bit technical o.o but I’ve never really had too much trouble generally understanding the text content of SGF’s so I think I’ll be able to puzzle it out eventually :p\

This is awesome!! I’m definitely gonna try tackling this later. I made a govariants account and started a tetris go game with myself :slight_smile:

5 Likes

The SGF specification is using a meta-language (EBNF) to describe the valid syntax of SGF files. I think the Wikipedia article does a fairly good job of explaining how this works:

2 Likes

Starting with the first sentence of this wikipedia article, and continuing with most of the following sentences, I am having a difficult time :melting_face: Like, the Wikipedia page for “context-free grammar” has in its first sentence phrases like “formal language theory”, “formal grammar”, “production rules”, and “nonterminal symbol”, each of which link to another wikipedia page that seems even more abstract to me

Is understanding EBNF itself actually necessary? :grimacing:

3 Likes