Starbeamrainbowlabs

Stardust
Blog


Archive


Mailing List Articles Atom Feed Comments Atom Feed Twitter Reddit Facebook

Tag Cloud

3d 3d printing account algorithms android announcement architecture archives arduino artificial intelligence artix assembly async audio automation backups bash batch blender blog bookmarklet booting bug hunting c sharp c++ challenge chrome os cluster code codepen coding conundrums coding conundrums evolved command line compilers compiling compression conference conferences containerisation css dailyprogrammer data analysis debugging defining ai demystification distributed computing dns docker documentation downtime electronics email embedded systems encryption es6 features ethics event experiment external first impressions freeside future game github github gist gitlab graphics guide hardware hardware meetup holiday holidays html html5 html5 canvas infrastructure interfaces internet interoperability io.js jabber jam javascript js bin labs latex learning library linux lora low level lua maintenance manjaro minetest network networking nibriboard node.js open source operating systems optimisation outreach own your code pepperminty wiki performance phd photos php pixelbot portable privacy problem solving programming problems project projects prolog protocol protocols pseudo 3d python reddit redis reference release releases rendering research resource review rust searching secrets security series list server software sorting source code control statistics storage svg systemquery talks technical terminal textures thoughts three thing game three.js tool tutorial twitter ubuntu university update updates upgrade version control virtual reality virtualisation visual web website windows windows 10 worldeditadditions xmpp xslt

Codepen

Codepen Logo

Hello!

This is a short announcement post to tell you that I've created an account on Codepen. Codepen is a site that lets you experiment with HTML, CSS and Javascript (or their compiled variants) and share your creations with the world.

I've already created something on there - I'll be blogging about that soon.

Right now though I'm rather ill though, so please don't be disappointed if I don't post right away (although I'll certainly try to get it out asap).

Here's a link to my Codepen profile page.

Dailyprogrammer challenge #197 - Validating ISBN Numbers

Hello again!

I now have a reddit account. You can find it here: https://www.reddit.com/user/starbeamrainbowlabs

I have attempted the latest Daily Programmer challenge.

This time I have written it in javascript. The challenge was to validate an ISBN-10 number. To validate an ISBN-10 number, you add 10 times the first number to 9 times the second number to 8 times the third number and so on. This total should leave no remainder when divided by 11. In addition, the letter X stands for a value of 10.

Here is my solution:

function validate_isbn(isbn) {
    var i = 10,
        tot = isbn.replace(/-/g, "").split("").reduce(function (total, char) {
            if (char.toLowerCase() == "x")
                total += i * 10;
            else
                total += i * parseInt(char);
            i--;
            return total;
        }, 0);

    if (tot % 11 === 0)
        return true;
    else
        return false;
}

I minified it by hand too:

function validate_isbn(a){var i = 10;if(a.replace(/-/g,"").split("").reduce(function(b, c){if(c.toLowerCase()=="x")b+=i*10;else b+=i* parseInt(c);i--;return b;},0)%11==0)return true;else return false;}

I should probably attempt the next challenge in C♯ so that I keep practising it.

The daily programmer challenge can be found here: Daily Programmer Challenge #197 - ISBN Validator

Twitter Account

I now have a twitter account!

You can find it here.

It will be mostly automated, once I rewrite the blog posting system. Until then I will post manually.

I plan to have the blog automatically tweet about new blog posts, but I will have to build some kind of system that will be able to tell the difference between new and updated posts first, since I make usually make several corrections to each my blog posts once I have posted them.

Github!

I now have a github account. I will be using it to house programming projects, most of which are / will be released on this website.

You can find it here: https://github.com/sbrl/

I currently have 1 repository, which holds something that will be released here soon.

Art by Mythdael