Þegar ég á að hanna leik fyrir strákinn

Ég held að hann Ívar minn veit að ég er að læra forritun, og að það þýði að ég geti búið til leiki.

Á leiðinni heim spurði hann Ívar mig "hvað gerir þú í tölvunni þinni? ertu búin að gera leik fyrir mig?" og hélt svo áfram að lýsa leiknum sem hann vildi að ég myndi búa til.

  • Aðalpersónan er Eldgosdreki sem heitir Snúbbí.
  • Hann á heima í vatni og syndir þar ofan í vatni.
  • Hann spýr eldingum, eldgos eldingum.
  • Hann borðar kjöt úr hundum
  • nei, það á ekki að vera kjöt úr hundum, það er kjöt af dánum köllum sem eru orðnir að vélmennum.
  • Hann mun safna styttum, og dublo, og öðru flottu sem hann leikur sér með
  • Hann á 5 afskektar eyjur
  • Þessar eyjur eru næstum því allar saman, en þær eru ekki allar saman.
  • Þegar hann fer að uppskera eyjuna, þá fær hann candyfloss og alla ísana, nema kúkaísinn (sem er ís með kúki ofaná)
  • Hann elskar allan ís, nema kúkaís, sem er ís sem hefur kúk...
  • Hann þarf líka að safna lyklum
  • Það verður líka kista full af gulli sem hann þarf að finna til að fá fullt af candyfloss.

"Hvenær verður leikurinn minn tilbúinn"

New Computer!

So yeah, I've built a desktop computer two weeks ago! It's awesome. Have had it running continiously for a bit over 10 days, sort of stress test for the long term that I was told about.
My computer setup on a diningroom table

The computer has some RGB, but I have the glass side of the case facing the window because it happens to fit my setup better. Of course I set it to purple theme, it lights up the front logo of the corsair case. Picture doesn't show my current keyboard.

After two weeks, the keyboard I bought was giving issues, disconnecting after certain amont of presses (essentially every 10-20 strokes), as if it couldn't handle being in a 2.0 USB port, even if that's exectly what it was designed for, said so on the box. Got a full refund even if it was a few days past the 2 week return policy of theirs, because I was returning it because of sticky keys and disconnections.

Went and bought a machenical keyboard (logitek G413), thought I found a quite one, oh how wrong I was. I went back to the store to exchange it for a Corsair k55 RGB pro. I'm liking it way more, though it was a bit dumb at the beginning. First I had to download the software to manage the light show, iCue, but it didn't notice the keyboard, so I could not use it to update the firmware on the keyboard, which was bugging out and failing to notice input too often, so I uninstalled it after trying lots of tricks to get it to work. Downloaded it again, apparently I had gotten version 3 previously, but the version 4 worked fine.

So we got a customized rainbow light show now, no issues with the input after the firmware got updated, but the keyboard was still being a bit dumb. It was as if it would sometimes fail to communicate with the software in charge of the RGB, so it would default to something I really hated (it just gave me the impression that the color changing effects were bad, but I learned that it was better than I thought). I had to replug the keyboard whenever that happened to get it to correct the color show (thankfully the keyboard worked fine for typing in the meanwhile), and 3rd time seems to have been the charm, it has managed to stay in rainbow mode.

Léleg þjónusta sem endurtekur sig

Hef ekkert gott að segja um Tölvulistann, lágt verð er ekki einu sinni þess virði til að fara þangað. Í gegnum árin höfum við upplifað lélega þjónustu, og það virðist ekkert vera skána.

Núna virðist vefverslunin þeirra vera algjört rugl, þú getur ekki treyst ef það segjir að varan sé til í verslun eða vefverslun, jafnvel ef þú sérð að staðan breyttist. Þú borgar fyrir vöru sem er ekki til, og færð endurgreitt einhverntímann í vikunni þegar bókhaldið kemst í það.

Ég mæli engan veginn með því að vera í viðskiptum við þessa verslun, myndi borga meira annarstaðar frekar en að vera gefa þeim pening. Slysaðist til að gefa þeim pening þarna því það er erfitt að finna skjákort í dag, sé strax eftir því.

Planning my new desktop computer

I am planning to get a new desktop computer, because this laptop is really getting on in years (Lenovo Yoga 510) that I originally bought when I started school 4 years ago on my path to web development.

It still works fine actually, besides for the random "static tube tv screen" that happens sometimes, learned that it's an issue with the hardware design, the plug connecting the screen to the motherboard is unstable, usually happens when I wake the computer up from sleep, and I sometimes have to login blindly and that change from login to open computer seems to trigger that weird tube screen effect to go away, gets worse over time (harder to get the computer out of that weird tube mode).

Had to have the screen replaced once already, when that tube screen effect wouldn't go away, none of my tricks to trigger the screen to become normal worked anymore.

Shopping list

didn't know they had a price compiler like this at Vaktin, but apparently they do, so here is my build with the parts (some parts selected for equal price as I am going for, since it seems it doesn't have the exact selection of motherboards).

My build at Vaktin

Actual computer planning

let's not get lost in old computers when we're planning a new one. I got my friend grandpa Goldy to help me plan the parts, he's got alot of experience with hardware and Windows machines.

Our limitation in parts is tied to what is locally available, and the site Vaktin does a good job at keeping a good overview of the local stores that sell hardware parts, though that chart does not have the full collections, it does however link to all those stores and gives a rough overview of which stores are cheaper in general.

Often enough if you buy all the parts from the same store, they offer to put it together for you as well.

Hope you all don't mind me using localized placeholders for the part types. Parts are not decided, will probably be looking for cheaper options on some parts, but these are the candidates so far.

Örgjafi

Thermal Paste

Kæling fyrir örgjafa

Aflgjafi (Power supply)

Móðurborð (motherboard)+

M.2

What and why?
Notes: It's important to note whether you're getting a SATA-based drive or an PCIe, NVMe-based drive. Your motherboard might not have the appropriate M.2 slots for both types, because SATA and NVMe M.2 drives are often keyed slightly differently, and even if it does, you don't want to waste money on a pricier NVMe drive if the motherboard can only access data using the SATA protocol. (from video linked). The PCIe has faster data transfer speed.

Minni (Memory, RAM)

Diskur (Long term storage)

Need to browse some harddrives

Skjákort (Graphicscard)

Turn (Tower)

Lyklaborð (Keyboard)

Stýrikerfi (OS)

Netflix úrvalið

Það er allavega farið að aukast í úrvalinu sem er með íslensku tali... það er eins og þeir haldi að við séum í rauninni Damörk, því nánast allt þarna inni finnst með dönsku tali þegar það kemur að barnaefni.

Úrvalið af íslensku efni á Netflix á augnablikinu, já þetta er allt, passar allt á einn skjá.

Ef þið vissuð ekki að það væri hægt að leyta að efni eftir tungumáli, þá er hægt að finna neðst í footer hlekk sem heitir "Audio and Subtitles" á vefsíðunni þeirra, en það er auðveldara að fara fyrst á prófíl síðuna, því annars er ómögulegt að komast niður að footer (það hleður alltaf meira efni í hvert sinn sem þú kemst á botninn).

Veit ekki til þess að það sé hægt að finna slíka leit á netflix app á smart TV

Barnaefni á netflix

Mér finnst merkilegt að það er ekki hægt að velja að setja barna svæðið á Íslensku eftir allan þennan tíma, það er hægt að velja dönsku, og kannski eitthvað samstarf við þá sem þýða svo margt barnaefnið. Það er svo sorglegt að mikið þýtt efni situr og safnar bara ryki í einhverjum gagna banka, því það er ekki lengur með leyfi til að sýna það, en af hverju ekki bara selja það til netflix svo það sé hægt að hafa meira Íslenskt barnaefni þarna inni?

Got to love Journals

I've always had a journal online, ever since I discovered the internet! I have posts dating back to 2005, and I used to post alot back then, almost daily, there was always something every week, and I was mostly just writing for myself, not expecting anyone to read it. I still do not expect anyone to read what I write, but it's always amusing when someone does leave a comment.

This is essentially my diary, I sometimes like to browse over it, the posts being like little landmarks of things that happen. So I really should have been doing a better job at posting, it's like hardly anything has happened over the last 10 years, there are currently 33 published posts since I migrated from livejournal.

LiveJournal

I was very active on livejournal, had a small group of friends that had access to it. Started it when I began socializing on a site called GaiaOnline back in 2005. There was probably not a week that went by without a post, plenty of emotions and musings to pass around.

Ever heard that it's good to write things down rather than bottling it up, even if you don't intend for anyone to read it and might even discard it afterwards? It does plenty of good when you have a lot going on in your head. That is how I used my journal, I never expected people to read it.

I think it was around 2008 when that little community of mine scattered to the wind, when GaiaOnline was changing a lot and people leaving.

WordPress

It was in 2011 when I got myself a shared hosting for the first time. I had played around with GeoCities websites before, I even managed to salvage that ancient website of mine for old times sake (last updated 2006). That's probably the time when I decided to leave livejournal and set up my first wordpress installation.

I managed to export all my livejournal posts and import them to my wordpress. I've been using wordpress ever since.

Tried out Disqus for comments, it was such a neat system, that allowed people to be logged in and comment on any website that was using discourse, because people like having things connected! Never really liked the default comment system of wordpress, but I kind of regret messing around with Disqus comments, because it kind of failed of keeping my older comments connected to the right posts (yes, I could import the existing comments into Disqus), and new comments get lost with the system if things got disconnected (it wouldn't know where the comments belonged).

Nearly all the imported posts have been set to private, because there is no reason for me to exposing my awkward teenage years to the public.

New editing posts

I just have to say that I really REALLY dislike the new way you edit posts on wordpress, it might not be the reason why I haven't been doing a good job of posting into my journal, but sure as heck it plays a big role in it since it arrived. I really wish it was a optional mode, there is a thing as simplifying too much to the point of it working against you.

I have discovered that there is a way to have a markdown block for editing, I think I'm going to go for that, to make things bearable.

Posting again regularly

I am going to try to post more again, because I actually enjoy the ability to browse through my journal to see the context of things, this is primarily just a journal for myself, and in cases where I don't want things public, there is always the neat little "private" setting for the posts. 

Hopefully when I'm done with school I'll be able to give this journal a makeover, because I hardly find the time at all during school or between semesters (because they squeeze in a 3 week program between semesters, so school never really ends).

I still don't expect people to be reading this or commenting, though I have set things so I get an email if someone comments, I've decided to stop using disqus, it was a hassle and I don't quite trust it anymore to connect comments to their right posts anymore.

Going over old posts

I feel the urge to go over my old posts, because the SSL says my website isn't quite secure enough, because of the use of images from external sources. I wonder if I can use images from my gallery (which is in a sub directory of this site) and have things stay secure according to the https security.

I just realised I might have lost parts of many older posts, where I had a plugin that would just show a preview of the post, and have a link "continue reading this post". Those links are broken, not sure if I can restore that, because I can't get the custom permalinks to work since I changed from shared hosting to a VPS

GuineaPig DokuWiki!

You all should know that the purpose of my studies at Reykjavik University is to be able to make the best localized information website about guinea pigs! There is such a lack of information that has been translated and easily available, so I had alot of fun creating such a source of information because of my web related hobbies.

Have been considering trying out DokuWiki as a base for the information, since it's a wiki that does not require a database (I do have a database, but it just feels like such a small sized project to require a database to store the information, it is currently just pure html and php pages, my first attempt at playing with the modularity of php at the time, having the header as and footer as something I could import).

The formatting syntax seems to be a hybrid of what you'd expect on mediawiki and discord.

Update

I found a very handly program (provided by dokuwiki) that allows you to transform html into dokuwiki syntax, which made it a whole lot easier to convert my website into a dokuwiki.

You can also embed HTML code into the pages, but it's disabled by default (then it just shows you the code instead of rendering it).  This let me keep my more complex tables from the original, and even add a style tag. Was having bit of trouble importing javascript to use (for sortable table), so that's out for the moment.

Found a nice template (theme) that mimics the Vector theme from mediawiki, the html structure was a bit odd (I was trying to adjust the style a bit for myself), so I resorted to simply using CSS grid to put everything where I wanted in the layout, this allowed me to easily move things around to create a responsive theme. Haven't fine tuned it further.

But this update to the grisanaggar website makes it easier to add new information and change it, provides a search feature for words, and I could even let other people have accounts to edit the content to keep things updated.  The easy inter-wiki links also makes things very nice and connected, don't have to think about where the page is located in my folder structure, just link to it's name.

The website was previously my first experiment with PHP to import headers and footers, the body of the pages was just pure html. So it was a very static website.

First impression of DokuWiki

I really like the simplicity of how it just has directories as namespaces, and you just reference them in a similar manner as you would with mediawiki. All pages would be in the 'pages' directory, and any sub directories there are extra namespaces, the 'wiki' directory would be referenced 'wiki:pagename'

The headings are a bit backwards, '====== heading ======' would be h1, '== heading ==' would be h5 (the lowest you can go with the doku syntax). I see no reason why they had to be so backwards, but I guess there is no changing that now.

Making a bullet list is annoying, it wasn't until I used the html to dokuwiki converter that I figured out what I was doing wrong. You have to have exactly 2 spaces before the * in order for it to convert to a bullet point, and for sub-bullets you just add further 2 spaces and so on. Simple enough, but I really wanted it to just be more like how markdown did things.

The ability to embed html and php code directly is neat, but as I mentioned, it's disabled by default

Overall, it's a super nice little wiki that stores things as files instead of on a database, but still manages to keep track of changes done to articles through the website (if you are editing the files through ftp, then it just counts as a external update and kind of clears the history).  You might not notice that you weren't working on a mediawiki when editing content on the dokuwiki if you have the Vector theme on, heh.

I like having the control of all the content being files, it makes it simpler to backup and store the whole wiki, perfect for little projects like this translated guinea pig info site, and you can actually add plugins/extensions to add features such as the imagebox to get a nice frame and caption on the images (exactly like mediawiki), and the gallery plugin that just lets you link to a specific media folder and it just shows you the thumbnails of everything within that folder.

5/3 nám

4. önnin á tölvunnarfræði lokið í Háskólanum í Reykjavík, bara stakt námskeið sem ég þarf að endurtaka allan þennan tíma (auðvitað er það stærðfræði tengt!), svo ég held mér gangi alveg ágætlega í náminu með börnunum og lífinu þar á milli.

Er ennþá mjög ánægð með að hafa ákveðið að fara í Vefskólann á sínum tíma, þá áttaði ég mig á því hvað ég vildi læra betur, því ég hafði ekki verið með það á hreinu. En á sama tíma þá er ég frekar fúl yfir því að námið þar var talið of grunnt til að vera metið einhvers virði í Háskólanum í Reykjavík, ekki einu sinni gagnvart þeim áföngum sem voru sambærilegir og væri þá líklegast búin með mörg námskeiðin sem teljast upp í sérsvið Vefþróunnar.

Það var eins og þau sáu bara "oh, þetta er Tækniakademían, ekki þess virði að meta þetta", svo það var ekki einn einasti áfangi frá því námi talið vera jafnvirði neins áfanga í RU, ekki einu sinni fyrir nein af þessum 3ja vikna námskeiðum sem þau troða milli anna... mjög ósátt við það. Núna er ég að fara taka "Nýsköpun og stofnun fyrirtækja", sem ég er nú þegar búin með sambærilegt frá Vefskólanum...

Ef ég hefði áttað mig á þessu, þá hefði ég frekar bara átt að hætta í Vefskólanum um leið og ég áttaði mig á því hvað ég vildi gera, og fara bara beint í Háskólann í Reykjavík, þá hefði ég ekki verið að sóa tveimur heilum árum í nám sem var metið til einskis.

Á þeim tíma, þá var þetta nám að sannfæra mig að það væru einingar á háskólastigi, en við vorum einnig bekkur númer 2 að fara í gegnum þessa nýju námsbraut, svo þetta var nú ennþá að aðlagast. Í dag eru þetta feiningar (sem ég kalla fake-einingar eftir þetta) og námið bara 3 annir, í staðinn fyrir þau 2 ár sem ég fór í gegnum.

Ég er þó komin með auka diplómu og aukalega reynslu á ýmsu veftengdu fyrir allt þetta. Vefskólinn: 2ár, Háskólinn í Reykjavík: 3 ár... 

Það er alveg satt að námið í vefskólanum var mjög grunnt í samanburði, nánast allt sem ég hafði lært í javascript þar var þjappað saman í stakt námskeið í RU og lærði samt eitthvað nýtt, mögulega hefði þetta verið flóknara ef ég hafði ekki kynnst þessu fyrirfram hjá Vefskólanum, en ég er ósköp fljót að læra nýja hluti.

Þannig ef einhver hefur áhuga á veftengdu og vill læra það, þá mæli ég frekar með að hoppa bara beinnt upp í háskólann, frekar en að vera fara í gegnum eitthvað millinám, nema þú virkilega hefur tíma til að eyða og vilt taka þessu hægt.

Vefskólinn virkilega gaf manni meiri focus á hönnunar-tengdum hlutum, svo það sjálft er alveg þess virði, en restin, ekki svo mikið, ef maður ætlar sér að fara líka upp í háskólann. 

Veit ekki hvernig háskóli Íslands tekur tölvunnarfræði, en veit vara að einhver mældi alls ekki með því, og ég sá ekkert sérsvið fyrir vefþróun þegar ég var að spá í þessu, þess vegna endaði ég upp í Háskólanum í Reykjavík, og er bara mjög sátt við mig þar (fyrir utan það að upplifa svo mikla endurtekt í tilteknum áföngum tengda sérsviðinu, eins og ég hef nefnt).

First time VPS

I have had a shared hosing for many years now, but over the years I have learned how restricting it can be for a web developer that wants to try something other than static websites.

After realizing how much the hosting would cost me compared to how little I made use of all the unlimited space and limits, I figured I would try my hand at keeping a Virtual Private Server, because it was cheaper by a lot, partly because you would be on your own to manage it, the hosting provider would not assist you.

Didn't seem too intimidating anymore after learning web development and still learning Computer Science at the Reykjavik University. It's just a remote computer, right? I have played with using localhost alot for projects, setting up databases, servers... and a VPS is basically the same idea, just strictly bound to the terminal CLI. 

It was suggested that I would just buy the smallest VPS package and see how well I would manage to transfer all the contents from the shared hosting service to the VPS (still the same provider, which made this simpler). I was even told that if I then canceled my shared hosting, the remaining money I had payed to keep it up for the year could be transferred to pay for the VPS. Sounded like a good deal to me.

So that's how I got my Ubuntu server up and running! And in hindsight I think things went quite smoothly, managed to find very good guides online by DigitalOcean about VPS and various setups.

  1. Set up the Apache server
  2. Add the PHP
  3. Add the database (went with MariaDB)
  4. Get the phpMyAdmin up and running
  5. Figure out how to increase the upload limit in PHP to import the SQL files.
  6. Migrate the websites one by one, just changing the directory of the default site to the directory I was setting up each time so I could see it on the ip in browser.
  7. Create the configuration files for the VirtualHost on the Apache server via ftp, so the domains will know where to connect.
  8. Direct my domains to the new server, wait for that to connect.
  9. Using the Certbot to get SSL certificates easy (many thanks to https://letsencrypt.org/ for the free safety). Got https now!

You are now a proud webmaster of a Apache server!

I was migrating a WordPress installation, Piwigo gallery, MediaWiki and a php website I made from scratch about guineapigs! The main things I ran into was the upload limit issue when I was trying to import the SQL exports, in the end I installed the PHP-FPM, and then things finally started happening.

Now the only thing I haven't figured out yet is how to be able to use the permalink rewrites for the WordPress, because if I use anything but the plain links, then I get 404 errors. Not a big deal, but it took me a moment to realize what the issue was because I was using custom permalinks.

First impressions of Drupal8

I did take down some notes when I was given an awesome introduction to Drupal8, though we weren't actually doing anything at the time, so this is somewhat of a recap of what was talked about and see if it will stick.

Keep in mind this is the first time I actually use Drupal, I wrote down some notes during the introduction/lecture which I'm kind of reciting here but will of course not include anything here unless I've tried it out before publishing this post.

Installing with Composer

I covered this in my previous post, my experience of setting up a drupal project for the first time. Since Drupal had a big makeover so it would use the Symfony framework instead of it's own custom framework, which spells a bright future for the platform and easier to handle for developers (it lowers the threshold/entry level considerably I was told).

When finalizing the setup in browser after having installed the system, you get choices of what kind of installation you want.

  • Standard is very convenient for starting a project
  • Minimal is stripped of everything except the core modules (even the default theme looks like they forgot to link the stylesheet)
  • Demo is an example of using drupal to make a website for a recipe magazine.

Folder structure

  • /web contains accessible files, config goes into .gitignore by default along with the 'modules'. You would work in this folder and run the PHP server from here.
  • /vendor contains packages and everything that doesn't really involve the developer directly, just like the node_packages in javascript.

The Drupal8 GUI

You can actually manage your installation completely through the Graphical User Interface instead of the terminal, which I actually prefer. 

The admin section is located at /admin from the root in browser, so you can find it regardless of theme or setup.

  • Content: the basic add content to the website (uses existing content-types)
  • Structure: for the developer to create content types and structure the website. The information architecture.
    • Content types: such as article, basic pages, you can create new content types to suit your needs, such as art piece, recipe, game feature, or anything depending on the project.
    • Taxonomy: tags, categories...
    • Views: database query builder, how will the user see the requested content (can be pages or blocks).
    • The ds (display suite) module provides multiple new ways to view your content, such as full, card, teaser and more.
    • The paragraphs module is very handy, it is a site builder with content blocks.
  • Appearance: the theme of the website
    • Drupal uses something called 'twig' templates.
    • There are sites like templatemonster that sell themes.
  • Extend: the modules
    • Since drupal stays clean of unnecessary modules, you will need to fetch anything that you would like to add. No clutter of unused modules unless you installed them yourself.
    • The module_filter is recommended, it makes it easier to sort through what you've added/installed
    • The admin_toolbar_tools is almost a necessity for administrative convenience. It includes the admin_toolbar.
  • People: Users and roles

The Modules

If you've tried managing a WordPress installation, then these equal plugins within the drupal setup. And drupal installations stay very vanilla and do not include anything but the bare basics. If you need something then you can most likely find existing modules in the drupal database.

Drupal does not include a admin console straight out of the box, that's why we'll use admin_toolbar_tools as an example for installing a module. It will give you a admin toolbar (as the name suggests) at the top and some other tools, generally makes the site easier to manage.

adding modules via command line

You can use command line to manage the modules and there are a few ways to do it. Drupal8 seems to include the drush shell to manage the installation via command line, there is also the Drupal Console available which was recommended to me.

You can even use composer to fetch the module files for you (it does not install them automatically) which is handy if you already used it to install drupal8. Here is an example of adding a module using composer:

composer require drupal/admin_toolbar_tools

adding/installing modules via GUI

It is nice to use the GUI to install the modules and manage them, doesn't matter if you added the modules via terminal or uploaded the zip with the GUI. 

When I had the minimal setup and tried to install the admin_toolbar_tools, it told me that it needed to install other required modules and I could simply say continue with the action (and it would install the required) or cancel.

Conclusion...

Since I have never tried any versions of drupal prior to version 8, I don't see what's so difficult about using this CMS and perhaps that is the reward for that complete overhaul of the system to use symfony instead of it's own custom framework.

I shall continue playing with this, the project I am working on will have a forum and news/blog for a small community. I will need to dabble with creating a theme as well.

Experimenting with Drupal8

I've wanted to get into Drupal since I got introduced to it during my short (2week) internship, so I'm going to write some notes here along the way while I try to setup a project.

I was told that Drupalize.me was a great place to learn about Drupal, but I want to see how far I can get without paying for such a subscription (and they have a discount for students, I might apply for that when University starts after the summer).

I also found this interesting list of 5 reasons to use Drupal v.s WordPress while I was experimenting.

Let's use the terminal...

Even if using the terminal to manage things was intimidating at first, I would much prefer to use it for project than installers, because I like keeping things as bare-bones as possible when I'm really trying to figure out how it works, GUI installers always give me the impression that it'll come with extra junk I wouldn't use or understand how it's relevant.

And the guy who gave me the intro into Drupal8 (Hilmar Kári, freelance programmer) much preferred to use the terminal for everything when possible.

But I really dislike using the Windows PowerShell, because apparently you can pause whatever it's doing by clicking the window, which can be pretty annoying when there is no indication that you accidentally paused it and are left waiting or anything running in that window isn't doing what it should).

I only use it to start projects, after that I have the option to use the inbuilt terminal of Visual Studio Code, which is quite handy and doesn't pause accidentally.

Using Composer to install Drupal8

Drupal has a guide on how to install the CMS using Composer

Composer is for PHP what npm or yarn is for JavaScript, but I'll admit that I've never really used it before, I installed it sometime ago for another project that I didn't actually get into, but now I have a chance to use it.

composer create-project drupal-composer/drupal-project:8.x-dev my_site_name_dir --no-interaction

This command will download the files and create a new directory containing our drupal installation. You can change the my_site_name_dir into whatever you wish, and if you don't want it to automatically install then adding --no-install at the end will prevent that (running composer install will let you manually install it after you've made whatever changes to the installation that you required for the project)

First obstacle: memory_limit while installing

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 32 bytes) in phar://C:/composer/... /Constraint.php on line 182

The default memory limit for composer seems to be 128M, and apparently it is a common issue for developers when using Composer for Drupal8 (because Composer seems to need lots of memory). There is a troubleshoot guide on the composer website that covers this issue, even the error message gives you the link.

The directions on the Composer website weren't solving the issue for me, maybe I'm not deep enough in the programming know-hows yet, but I did find a very easy to understand explanation and solution to the memory issue. To easily find location of the file you need to edit just run php --ini in the terminal, then simply open that file in your favorite editor and increase the memory_limit (setting it to -1 will make it unlimited).

Simple PHP server to view in localhost

You can actually view your PHP project in browser even if you only have PHP installed on your system, because it has a inbuilt command that starts up a PHP server.

cd web
php -S localhost:8000 

As such, there is no real need WAMP/MAMP or other such server setups just for displaying PHP in development, but they do make things convenient and create a full server locally with database and other things (as far as I'm aware)

Seems that my PHP version is outdated

When going through the final setup (in localhost) I discovered that my PHP version was outdated (5.x) which was actually supplied by my WAMP server. The recomended version of PHP is 7.2 as of Drupal8.5, and apparently the support for PHP5 ended with Drupal8.7

I have come to realize it doesn’t really matter where you keep the folder containing the code, just need to add it to the System Environment Variables Path (I’m using win10, in case you were wondering). Ended up uninstalling WAMP (because it didn’t occur to me to update it) and getting XAMPP that contained the version of PHP that I needed, and then proceeded to add it’s PHP folder to the system paths. My experiment with downloading the code directly from PHP wasn’t working out even with restarts of the computer.

I have to do the whole memory_limit thing all over again now…

Now I just need to connect a database

I did mention that I installed XAMPP server, it comes with a MySQL database which I’ll be using. The default access to the database has no password which seems to be quite common for a development server, but of course it should be more secure than that when things go into production.

username: root
password:

I created a new table for the project through phpMyAdmin and went through the installation process from localhost:8000 and just chose the default as a beginner, everything went smoothly and now I can start developing a website with Drupal8.