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.

Margt að gerast

Ég hef verið að gera frekar margt undanfarna tvo mánuði:

IcelandFurs er það sem við köllum Íslenska Furry hópinn og við vildum hafa spjallborð fyrir hópinn sem einskonar miðstöð. Getur skoðað vefsíðuna til að læra meira um hvað Furry er. Þannig að ég er vefstjórinn hjá þeim hópi þótt vinkona mín hún Abby er í raun andlit hópsins eins og er.

  • færa vefsíðuna mína frá "dark-stardragon.com" yfir á "myramidnight.com" (bæði bloggið og galleríið)

Vildi hætta með "dark-stardragon.com" en lénið endurnýjaði sig sjálfkrafa áður en ég tók eftir því (tvö ár í einu) en ákvað samt að kaupa mér "myramidnight.com" og færa mig yfir á það. Það þýðir bara að ég mun hafa gömla lénið næstu tvö árin aukalega. Færði alla póstana sem ég hafði gert yfir á nýja WordPress og er að vinna í því að setja myndir inn á nýja galleríið. Þetta mun taka smá tíma að gera eins og ég vil hafa það en þetta er í raun allt komið eins og er, þetta virkar. Er að nota Disqus innleggs/comment kerfið sem er þæginlegt, leyfir þér t.d. að nota facebook aðganginn þinn til að setja skilaboð á það sem ég skrifa hérna.

Nýja galleríið hefur tvö tungumál sem ég hef sett upp, viðkomandi getur valið annaðhvort ensku eða íslensku þegar þau skoða galleríið. Það þýðir að ég get sett sérstakan íslenskan titil og lýsingu á myndunum, en enskan er sjálfkrafa valið (þannig að ef þú ert að skoða galleríið á Íslensku, en einhver lýsing eða titill er á ensku, það þýðir að ég hef ekki sett neitt sérstakt á Íslensku við þá mynd og það birtir þá sjálfkrafa enskuna).

  • gera grímu (hrafna gríma sem ég er næstum því búin með)

Hef verið að búa til grímu af hrafni, sem hefur tekið meira en tvær vikur þótt ég er næstum því búin. Þetta er í raun byggt á einum karakter sem ég bjó einu sinni til sem er hrafn með rauð augu og stundum með dreka-skott, og hefur mikinn innblástur frá "Death" sem er persóna úr "The Sandman" teiknimynda sögunum. Karakterinn minn hefur verið kallaður "RoadKill" vegna myndar sem ég tók af henni einu sinni á 3D spjallsvæði (IMVU), en kalla hana líka Death eða Teleute.

Gríman getur opnað gogginn, og er frekar raunverulegt að sjá. Keypti feld-efni hjá Vouge. Getið séð myndir hérna: Gallerí

  • keypti nýja Wacom teiknitöflu sem þýddi að ég þurfti að uppfæra tölvuna mína vegna þess að taflan virkar ekki með Windows XP

Fór nefnilega í Tölvutek í gær og keypti mér nýja Wacom teiknitöflu vegna þess að gamla taflan mín var orðin mjög úrellt, gúmmíið farið af pennanum og drifið hætt að virka stöku sinnum. Gamla taflan var Wacom Graphite og nýja taflan er Wacom Intuos: Creative Pen & Touch (hefur snerti-flöt eins og á fartölvum sem skynjar tvo fingur í einu). Rosalega ánægð með það vegn aþess að það var kominn tími til, en vegna þess að hún virkar ekki með Windows XP þá var kærastinn að uppfæra tölvuna mína áðan í Windows 8, sem er frekar skemmtilegt vegna þess það er gert fyrir snerti-skjái og þegar ég er með snerti-töflu þá get ég notað þær aðgerðir. En auðvitað tekur tíma að læra að rata á þessu nýja stýrikerfi, þetta er allt öðruvísi.

Leiðbeiningarnar sem fylgdu með voru einfaldar, kanski of einfaldar: hélt að auka penna-oddarnir væru ekki til staðar, ekkert í bæklingnum gefur til kynna hvar þeir eru svo maður áætlar að þeir hefðu átt að vera í litla pokanum sem hefur nokkra aðra smá-aukahluti, en oddarnir voru í rauninni innan á miðju-lokinu sem þú getur opnað aftan á töflunni. Svartir oddar á svörtu loki eru ekki áberandi, engan veginn.

  •  Svo var ég að hætta hjá Nóatúni í Janúar vegna "Samskiptar Örðuleika"

Yfirmaðurinn var bara mjög lélegur í samskiptum. Lofaði mér nýrri stöðu í vinnunni með mánaðar fyrirvara, dró það í langinn og sagði mér svo á síðustu stundu þegar ég átti að vera komin í það verkefni að hún hafði nú þegar ráðið einhvern annan í það verkefni og ég þurfti að færa vaktirnar mínar. Algjört kjaftæði og alveg komin með nóg, svo ég sagði upp og hafði góða ástæðu til. Var þar að auki á röngum launum í lengri tíma og þurfti að fá VR til að láta þá leiðrétta þau almennilega. Ekki vantar að þau gleymdu að senda skattkortið mitt á vinnumálastofnun svo skatturinn var að taka fullt af mér...

It smells like Facebook!

Hahaha! Síðan mín er orðin að fésbók síðu, þar til ég breyti henni kanski til baka síðar. En þetta er svo sniðugt! Ég verð að viðurkenna að það er afskaplega þægilegt hvað facebook gerir með kommentin á forsíðu.

It smells like FACEBOOK.

my wordpress site looks like facebook! somewhat, I poked it so it would look a bit more personalized, but still… would you even wonder about if you are still on facebook or not looking at that? (click the link to see the original). Got to admit that what facebook does with its comments on the front page/index, where you can see the latest 2-3 comments on the post, and when you want to view older posts, you just add them on, instead of being lead to load another page just to view those older ones.

I hope I can mess with this a bit, or wait for someone else to do it, because I would love getting a view of the comments from the index instead of having to look at each post to see them. Those tiny things facebook has shown us which are awesome and should be used more. You do not need to invent everything from the ground up, stand on someone’s shoulders so you can reach further ahead, to lead us all ahead.

PS. I will most likely change it all back later (the theme on my website) or create a new one around this facebook style when Im done with exams and stuff… how it looked like if I change it back.

~Leave a comment?

Fancy new Gallery3…

Im done updating my gallery, and managed to get all my pictures back into order easily, only lacking custom thumbnails and titles. Need to manually edit 2k pictures if I wanna fix that.

There will be alot of broken image links, but I cant be bothered to fix all that until after Christmas.

~Leave a comment?

upgrading sucks.

Alright. Im updating my gallery from gallery2 into a fancy new gallery3 (yeah, the names are quite plain and simple) but apparently something is broken within FireFTP or something else, because the simple action of renaming a folder caused all other files and folders to disappear, no process of deleting or anything. So all my directories and gallery folders are GONE, I'll thank God for the little luck that the only folder that didnt get deleted is the one who contained all the base images. But with the rest of the folders gone, all my image links break completely.

So until Im done installing my new gallery3, my portfolio and all the rest of them folders is gone and done for. I just hope that me backing up the gallery helps arranging the folders again. Oh gosh. Its all gone, Im still hoping I dont have to manually fix it all if all the new image links will be different. Seriously...

Edit: for a second there I thought my whole site was gone as well, it would have been a bummer.

~Leave a comment?