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í.

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?

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.

Útskrift úr Vefskólanum

Ég var að ljúka við námið í Vefskólanum, bara eftir að sækja plaggið í næstu viku. Það er svo margt sem mig langar að gera núna með þessari kunnáttu sem ég hef aflað mér, þar á meðal væri að uppfæra/endurgera vefsíðuna mína hérna. Hún endurspeglar engan veginn hvað ég hef lært, hef ekki snert þetta þema í mörg ár.

Planið er að sækja um í Háskóla Reykjavíkur, tölvunnarfræði í vef og viðmótshönnun til að fá mína diplómu í þessum málum, um leið og ég fæ gögnin í hendurnar. Þetta er spennandi, bráðum verða báðir strákarnir mínir komin inn á leikskóla svo ég mun hafa tíma í meira nám án þess að þurfa pæla jafn mikið í pössun.

Þrátt fyrir að hafa misst svolítið úr náminu vegna fæðingarorðlofs á 2.önn þá tókst mér að útskrifast með mínum hóp, þeim finnst gaman að segja að strákurinn minn hafi fengið forritun beint í æð þar sem hann var mikið upp í skóla eina önnina.

Þuklað á vefbrasanum

Þetta nám hefur verið alveg æðislegt fyrir mig, einhver lýsti því svoleiðis að maður fær að þukla á öllum sviðum, sem auðveldar manni að átta sig á eigin hæfileikum í þessum brasa og hvað sérsvið manns gæti verið. Áður en ég fór í námið þá hafði ég aldrei farið út í JavaScript né PHP vegna þess að það getur verið svolítið 'intimidating', en núna að loknu námi þá hef ég áttað mig á að ég sé furðugóð í JavaScript miðað við hvað ég hafði verið að ímynda mér áður fyrr.

Núna veit ég að mig langar að halda áfram í námi, fara í Tölvunarfræði í HR og fá smá viðurkenningu fyrir kunnáttu, það á nú einnig að tryggja manni betri stöður í framtíðinni svo best að ljúka þessu af. Það var ekki fyrr en ég rakst á vefskólann að ég áttaði mig á hversu mikið ég myndi vilja vinna í þessum brasa og að ég er bara andskoti góð í þessu.

Ég hef alltaf verið að fikta við framenda forritun síðan ég fékk aðgang að netinu, lært að nota CSS til að gera 'custom profile' á mörgum síðum sem leyfðu notendum slíkt. En aldrei hafði ég virkilega sökt mér ofan í þetta, svo hef ég verið vefstjóri í lengri tima, sett upp vefsíður fyrir sjálfan mig og vini, prófað að setja upp ýmis vefumsjónarkerfi á borð við WordPress, phpBB spjallborð, Gallery2/3 og PiwiGo gallerí. Langaði alltaf að gera vefsíðu sem væri bæði blog og gallerí eða blog og spjallborð, en það var svo erfitt að finna akkúrat þær lausnir sem mig langaði í með notkun plugins og modules. Núna eftir námið þá er ég komin með svo mörg tól í verkfærakassan minn að ég ætti að geta gert nánast hvað sem er.

Núna þarf ég bara meiri reynslu

WordPress og Drupal

Ég fékk alveg svaka flott intro frá honum Hilmari Kára (þegar ég fór í starfsnám á vefdeild Reykjavíkurborgar) um Drupal og núna veit ég hvaða kerfi ég myndi vilja frekar eyða tíma í að læra inn á. Hann gerði þá samlíkingu að WP væri Duplo með stórum einingum sem hægt er að púsla saman á meðan Drupal væri þá tækni-lego í samanburði, þröskuldurinn til að geta byrjað að nota Drupal er talsvert hærri en hjá WordPress, en með nýjustu útgáfu Drupal (v.8+) þá hefur þessi þröskuldur lækkað talsvert.

Ef þú hefur prófað að nota 'advanced custom fields' við gerð WordPress vefsíðu og haft gaman af því, þá jafnast það ekkert á við Drupal þegar það kemur að upplýsinga arkítektúr. Ég get varla beðið eftir að prófa þetta sjálf.

Setting up Dev and Production sites

It seems like a good practice to have a development site that you work on locally and then migrate/update that to a live website, or putting it into production as some might say. This is of course not necessary, but probably on the list of best practices.

These posts I make to document my first impressions and experience are generally just notes about the process that I might look back on later since it takes some time for information to stick. Even the pros in the business got their cheat sheets and google as best buddies.

The hosting and local

There is no standard server setup, so many components and pieces that come together to allow you to have a website live on the internet. The operating system, the databases, programming languages and versions, interfaces and management systems. I will admit right now that I am no server expert and probably never will be, but just like how it matters what pieces and software your computer contains can effect how your games work, same goes for the server setup.

If you are lucky, then everything goes smoothly and customer service saves the day if anything comes up. But I learned a great deal while struggling with my hosting to figure out why things weren't as smooth as I hoped it would be, and hopefully it will help others to not waste time on running in too many circles.

Easiest way to help things go smoothly would probably be to have your local setup mirror the hosting. To have the same database types and versions of software. I am currently using XAMPP which gives me Apache server and MariaDB database.

Issues with phpMyAdmin

The most important thing for your website is probably the backups, without them you cannot restore your website if something goes wrong, and backups are also used to migrate the website from one place to another.

So of course I got concerned when I got errors while importing the database export. I learned after a whole week of running around trying to solve things on my end that the database issues I had could be solved by simply updating the phpMyAdmin because the hosting apparently had a outdated version and wanted to blame the issues on Drupal because "Wordpress works fine". 

Basically the database exports via the phpMyAdmin were causing the issue, which was a but fixed in PMA 4.4.4 (my hosting was usting 3.9.x). 

Learning web development is pretty interesting

Well, I've been learning website development for the past year now and that includes design and programming. Never touched JavaScript before this and I find it quite interesting. Sometimes the best way to get something you learned to stick in your head is to try to explain it to others.

Even though I was quite familiar with HTML and CSS before I entered school, I have continued to learn new things about it since that sometimes make me feel amazed at how I was just scratching the surface of it. Many things that seemed intimidating to get into turned out to be quite simple and gave me access to interesting tools of the trade.

I will now share with you some notes

Notes about HTML

HTML has apparently gone through some improvements since I first started fiddling with it ages ago. There are now many useful new tags that help define the content's purpose and avoid creating a div-soup where you are unable to distinguish the many divs apart. I will name a few, but you can easily see the full list on W3Schools (all the tags from HTML5 are indicated with a red little "5" icon).

  • <header> and <footer>
  • <main> defines the main content
  • <section> indicates sections
  • <nav> for navigation
  • <figure> is good for adding pictures with captions (you can use <figcaption> within it to add caption

Not only does it make it easier for you to scan over the code when you use these tags, but it also greatly improves accessibility to your site for users that rely on screen-readers (both blind or visually impaired users). Keep in mind that Google is the ultimate blind user, and you will most likely want Google to be able to access your site so it'll appear in their search.

  • You should always use alt="" in your image tags, leaving them empty will make screen-readers ignore them. You should not add any description to the image if you have caption under it (else you would be forcing the screen-reader to repeat itself).
  • Just using the right HTML5 tags instead of countless divs. Having well structured content will already improve accessibility to your site without needing to go the extra mile
  • You can use tools like WAVE Accessibility Evaluation Tool to quickly check how accessible your site is. You mainly need to keep an eye on the red errors rather than being worried about minor issues.
    • If you really want to dive into accessibility and have elements on your website that the standard HTML tags wont define them well enough, then check out ARIA (link). It is a special web suit that increases accessibility for screen-readers.
  • Use headings (h1,h2... ) correctly and not based on it's default font-size because styling that should be done with CSS.
    • <h1> should only appear once per page (for website title for example) and then go by importance (for example <h2> for declaring navigation, <h3> for section titles and <h4> for sub-headings within sections/articles and so on).

Notes about CSS

  • Your new best friend is 'box-sizing' because it eliminates the pesky inconsistencies when dealing with height and width of elements, so if you tell a element to be 100px wide, it will stay 100px even if you add padding or borders.
  • You can Animate with CSS! seriously, without touching any JavaScript. check it out
  • It is very handy to use the EM and REM units when designing, it is based on font-sizes. EM is relative to the fontsize of it's parent element, 1em = the parent's element font-size, but this makes it scale easily. REM however is very consistent since it is based on the font-size of the base 'HTML' element itself.
  • SASS (or SCSS) is a super handy compiler that lets you compose CSS without the extra repetitive work. It lets you make variables and even includes special functions, generally making it simpler to code and makes your life easier as a developer. It then compiles whatever you write into a normal CSS file that you can use. check it out

Notes about JavaScript

JavaScript was created by Brendan Eich in 1995. Even though we generally talk about using JavaScript, the word itself is trademarked by Netscape (where Brendan worked at the time), so the standardized version of it is officially known as ECMAScript, ECMA stands for European Computer Manufacturers Association.

I was also told that Java is as related to JavaScript as ham is to hamster

  • Functions can be values
    • Factory functions is any function that returns a (presumably new) object without using the keyword 'new'
    • Callback functions are functions passed as an argument into another function (using it as a value)
    • Higher order function is a function that takes a function as an argument (callback functions), or returns a function
      • .filter() lets you filter
      • .sort() lets you sort
      • .map() allows you to transform the item
      • .reduce() reduces a list into a single value
  • Functional programing makes use of pure functions and function composition
    • Pure function will always give the same results when given the same input. It is self contained and does not refer to anything outside of itself (therefor having no side effects).
  • Object Oriented Programing (OOP) is using objects to store information, such as APIs, and working with those objects
    • Inheritance is a way to create objects with properties it inherits from it's parents.
    • Composition is a flexible way of doing OOP, where you assemble objects based on what they do.
  • Javascript is originally without classes, but it got introduced in ECMAScript6 and are therefor a relatively new feature. They work well with OOP and inheritance. Creating prototypes is simple with constructors but you need to create them with the keyword 'new' which can be tricky to work with, it makes it difficult to do composition with them.

What have I been up to?

Well, I figured I should write a little post about my time for the past year because I kind of disappeared from the virtual world without a word. But second life seems to always draw me back in.

Well many things played a part in causing me to go poof without a word:

  • My desktop computer had bluescreen issues that were traced to supposedly missing drivers.
  • I had a baby and babies need alot of attention (which I didn't mind, my boy is adorable)
  • My attention span tends to be limited, if I do not login for a while I might simply forget to start logging in again. That's why I like to keep things inter-connected, such as this blog posting to my facebook for me.
  • Baby hated it when I was sitting/standing still for too long, which made using the computer difficult even if baby was wrapped around me snug and cozy so I could use both hands.
  • I was very content with just spending all my attention on the baby, so in the end the computer got disconnected to make space for other things as I re-arranged things around the house
  • I used my husband's computer which he would always have priority over, so my time was limited to when he wasn't home most of the time
  • I was on my mobile phone most of the time

When I suddenly decided to apply for webdesign/development school, I started to think more about computers again, mostly laptops, but I was doing research on what I would need. Good laptops to run the graphics programs I wanted were usually gaming computers which were missing an essential key to coding (at least on a Icelandic keyboard layout) between SHIFT and Z. Ended up just plugging my old desktop computer back in, and realized that husband had actually done a clean install of the OS which apparently cleared out the bluescreen issue, totally forgot he had done that.

So now I have a computer, baby lets me use it (most of the time), and I do not need to share it with my husband. Now I just need to install the programs I wanted to use since this is like a brand new computer since it was whiped clean. I can let skype auto login and what not to keep in contact with people again.

Ný myndavél og lúsugir naggrísir!

Ég keypti mér nýja myndavél nýlega, í raun fyrstu góðu myndavélina sem ég hef átt: Sony a5000.

Hef verið að nýta mér hana til að taka myndir af naggrísunum mínum og öðrum hlutum svo ég gæti látið flottar myndir fylgja þeim greinum sem ég skrifa um naggrísi, vegna þess að ég hef verið að búa til lítið svæði hérna á vefsíðunni minni með góðum upplýsingum um þessi gæludýr. Endilega skoðið það ef þið hafið áhuga á naggrísum. En hef verið frekar upptekin á heimilinu við að reyna gera allt á sama tíma: taka til, skrifa um naggrísi, þvo þvottinn á fullu. Það uppgötvaðist nefnilega lús/flösu-maur á naggrísunum sem ég hef verið að passa síðan 2. mars, og þurfti að sótthreinsa allt og þrífa áður en ég gaf þeim meðal til að drepa þessi sníkjudýr, setti þær einnig í bað til þess að vera alveg örugg. Ætla mér að skrifa nánar um það í öðrum pósti bráðlega, og auðvitað munu vera flottar myndir.

Smá fréttir af þessum nýju húsgestum:

Zappa

Zappa (karlinn) er með of mikið kalk í líkamanum, er ennþá að pissa hvítu síðan ég fékk hann í hendurnar, og ég hef varla verið að gefa honum þurrmat (sem er ráð til þess að takmarka kalk-inntöku). Þarf bara drekka miklu meira vatn en hann hefur verið að gera, vona að það skoli það úr honum áður en hann mögulega fer að fá nýrnasteina. Það fylgdi þeim fullt af gæludýra nammi, gæti verið sökudólgurinn: annað þeirra var í raun ískex með ávaxta-kremi í miðjunni og inniheldur mjólk og sykur, rosa gott á bragðið fannst mér fyrir utan fituna sem festist í gómnum á manni. Hitt voru einskonar jógúrt-dropar. Ég vil minna fólk á að vera ekki að gefa naggrísum svona, þetta er oft hæft til að vera nammi handa mannfólki.

Stronghold (selamectin), lyf gegn sníkjudýrum

Fann síðan lús/flösu-maur á honum, sem var ekki spennandi uppgötvun vegna þess það þýddi að allir 5 grísirnir væru núna mögulega með lús. En ég fékk að vita að lyfið sem maður notar til þess að aflúsa þær er hægt að taka með heim og gera þessa meðferð sjálf, alveg snild. Samt tók ég sökudólginn með mér til að læknirinn gæti staðfest hvaða lyf ég þurfti. Hún lét mig hafa þessar krúttlegu litlu 15mg túpur sem virkuðu á tvo grísi hver, setur það bara í hársvörðinn á hnakkanum. Þurfti samt að vikta alla naggrísina og fattaði að hún Rósa mín er heilum 200g léttari en restin og þurfti dropanum færri af lyfinu.

skrítinn vöxtur á nefinu

Það er síðan skrítinn vöxtur á nefinu á einni stelpunni, sem minnir mig bara á einskonar vörtur sem mynduðu lóðrétta rönd á nefinu á henni. Fór auðvitað að rannsaka það á netinu og uppgötvaði að fólk er að kalla þetta "fungal nose stripe" og enginn vissi af hverju þetta birtist. En það var samt hughreystandi að þetta væri ekki smitandi og angrar ekki naggrísinn, þetta bara er þarna og ekkert hægt að gera í því (fólk hefur reynt allskonar hluti og sveppa-lyf).

Fyrir utan þetta þá hafa þeir það alveg æðislega gott. Stelpurnar allar orðnar að bestu vinkonum og strákurinn fær stöku sinnum að hanga með þeim (með ströngu eftirliti auðvitað) sem honum finnst alveg ótrúlega gaman þótt að stelpurnar eru ekki alveg á sama máli. Þær hafa það sjálfsvarnar viðbragð að reyna sprauta smá pissi framan í karlinn þegar hann er of ágengur. Þurfti að búa til smá pissu-vegg til að verja veggfóðrið hjá mér út af þessu. Fjóla var bara allt of tilbúin til að sprauta á hann, gaurinn þurfti ekki einu sinni að koma við hana. En hann var að skemmta sér alveg konungslega og fær ágæta hreyfingu út úr þessu (og stelpurnar þá líka).