I’ve been really enjoying my 3D printer over the last year or so since I got it. Printed many things, some of which I’ve designed myself (and even documented some). Not all are worthy of talking about, but I thought this one was pretty nice. We recently got a Yoto Mini Player (referral link) for our 5 year old with the hope of prolonging when we inevitably buy her a tablet.
TL;DR: I designed a 3D printed fume extractor for soldering; you can make your own if you read this. I recently got into 3D printing, electronics, and related topics. I want to write more about this in the future, as there is quite a lot to say on this wonderful subject. Today, however, I wanted to showcase my latest creation. This is significant because it is the first complete…
I’ve been a life-long fan of LEGO. Some of my earliest memories are of either playing with LEGO, and endlessly reading the catalogues (which I’ve still got). As I got older my life-style (i.e. living in a small, one-bedroom London apartment) made it hard to play with and display my LEGO, so I didn’t buy any for quite a long time. That changed a few years back when we moved to a…
Right, it seems this is my fifth first blog post, sort of. The fourth one was on this domain, but was done on the previous incarnation of the website (it used to run on WordPress). I’ve also not written anything in a terribly long time and after my website completely died earlier this year (a story for another day) I decided it’s time to renovate and to, maybe, start writing here a bit…
My name is Jan Hančič and this is my little corner of the world wide web. By profession I’m a software engineer. In my personal life things are a bit less certain; who I am changes yearly, which is exactly how I like it. However, there are a few things that I hope never change. I am a father to my exceptional daughter, partner to my amazing companion and I’m a vegan.
We had an awesome Hackday at Caplin a couple of weeks ago. My team built, in 24 hours, something very special: augmented reality table tennis. I’ve written a blog post summarising how we did it on our company blog. You can read it here. Or, if you don’t feel like reading, you can watch a video of it here.
Inspired by React’s keyMirror function I decided to roll my own, with one extra feature. It was really more of an excuse to start contributing to my GitHub account again, as I realise that the thing I made isn’t really note worthy. But then again, around 120 people have downloaded it in the last month, so maybe it’s not that useless. So what is it? It’s a really simple…
This isn’t a technical post, but a rant from a user’s point of view rather. I’m going to talk about mobile browsers on Android, as that’s the device I own. I don’t know what the situation is like on iOS, Windows or other. But I do hope it’s better. Currently I have three browsers installed on my phone, and that is just ludicrous. The three browsers are: Dolphin,…
I haven’t posted here in a while. But I have written two blog posts for my company’s blog. The first one is about me attending a London JS classes lecture, where I learned how to use JavaScript to control an Arduino. You can read it here. The other one was published more recently, and talks about using git bisect and a product we make, BladeRunnerJS. Read it here.
Unfortunately we still need to support IE8 at our company, as that is what customers demand. Frustrating but necessary. So we have to spend a great deal of time fixing performance issues in this old browser. Recently a lot of us had serious performance problems with looping over arrays with the ES5 Array#forEach, so we had to change the code to “regular” for loops. And in one case even…
I’ve written about the problems of console.log(). I’ve also said that I’m going to do something about it once I have some spare time. Well, I had some spare time, so I fixed it. The result is this little repository: console.real. There really isn’t much to it. You either call console.real.log() instead of console.log(), or you call console.real.install() and then just use…
Today I’ve stared in my screen in disbelief when I’ve found out that console.log(), in Chrome (haven’t tested other browsers), doesn’t work the way I thought it works. I’d rather not think back on how many hours I’ve wasted by missing a bug because of this. So what’s the big deal? Well, it turns out that when you log an object to the console, it might not…
This is one of those first world problems, for sure, but it’s also a good startup/pet project idea. I’m sure anyone with a smartphone has the same problem, they might just not realise they have it. Notifications. They’re great, they let you know what’s going on. But it’s a problem because you get notified two, or more, times for everything. Let’s take me for an…
JavaScript allows you to omit semicolons at the end of certain statements as they will be inserted for you automatically. One can also put opening curly brackets on a new line. These two things are optional. Until they aren’t. And then it hurts. JavaScript has a thing called automatic semicolon insertion (ASI), which basically means that you don’t have to put semicolons into your…
Today marks my 30 day streak on GitHub. I didn’t start off with the goal of reaching 30 days, it just kinda happened. Sure after a while I didn’t want to break the streak, so I’ve “cheated” a bit occasionally with just opening a issue or by removing a space here and a new line there. But most of the days I’ve actually done something meaningful. And I plan to…
I’ve been working on a small JS library lately and as things started getting bigger and bigger it was time to split the code across multiple files. Having small pieces of functionality in separate files is great for reusability and testability. But then I had a problem of how to create the output file that would contain all the code, wrapped in a IIFE. So naturally, in the heat of the…
I’ve decided to disable new comments on this blog. To be honest I just got feed up with all the SPAM that was coming through the Akismet filters and I haven’t seen a legitimate comment in months (which is a bit sad, but entirely my fault since I haven’t been writing all that much lately). I would receive at least one email from my blog telling me to review a new comment and it…
Unwanted globals can sneak into your JS codebase quite quickly, all you need to do is forget that pesky var. That can off course introduce all sorts of trouble to your code base. If you’re lucky you’ll just be a bit embarrassed when your co-worker finds the global. But if you’re unlucky, that global can cause all sorts of bugs through your code base. That’s why I’ve…
I haven’t written in a while here, I know, I’ll try to amend this in the future. But the reason for my lack of writing is quite simple: I switched jobs and moved to another country. So you can imagine I’ve been quite busy and simply hadn’t had the time (+ I had to wait for more than 3 months to get broadband at my new place, but that’s a different story).
Node.js is famous for being asynchronous. That means you’ll have a lot of callbacks or anonymous functions in your code. This can quickly lead to somewhat hard to follow code (hello callback pyramids). But that’s not what I want to talk about today. What I want to talk about is the order of parameters in functions that also accept callbacks as parameters. To be fair in most of the…
I’m currently looking for a full time web-dev job in London. And a few days ago I remembered the monthly " Ask HN: Who is hiring?" threads on Hacker News. I also remembered what a pain it is to browse that thread. Especially if you’re not from the Bay area, for where most of the jobs are. So I fired up my favourite editor and started making a simple bookmarklet that would remove all…
When it comes to web pages I’m a bit of a speed freak. I’m constantly on the lookout for new techniques to make my pages faster. So it’s a great pleasure that I can now say that I came up with a new * technique to speed up page rendering. The idea came to me while I was analysing one of my pages and trying to figure out how to reduce the number of requests.
We all know that client side form validation leads to a better user experience, but why are so many pages out there without it? JavaScript validation can save your users a lot of time and frustration by informing them that they did something wrong as early as possible. And this is especially important on mobile. Everything takes at least twice as long (and I’m being generous here) on mobile…
Reading Hacker News threads, related to Twitter Bootstrap, is lately kinda like going on a walk with a child, that just learned the word “car” and is now pointing and shouting “car, car, car!” all the time. Yes, it’s a car now, please, shut up. Seriously, every time there is a story posted about some project/startup/hack, that happens to use bootstrap, people of HN…
Last weekend I came up with an idea for a mini web page: SDSzombi.com. The idea came to me after the friday protests in our capital city. I won’t explain the issues in Slovenia at the moment, but suffice to know that our government (or rather the leading party) has labeled all protesters as zombies. They’ve done that on Twitter, where they also regularly block anyone who expresses…
I was reading this article on how Facebook is experimenting with taking payments to deliver your message to some person’s inbox and not the “other” folder. That reminded me that I should check that infamous “other” folder, just to check if somebody was trying to get in touch. Luckily there wasn’t since people still use email, not this half-assed messages thing…
Today the internet is filled with news about Instagram changing their Terms of Use. The meat of this changes, for me at least, is this: You agree that a business or other entity may pay us to display your username, likeness, photos (along with any associated metadata), and/or actions you take, in connection with paid or sponsored content or promotions, without any compensation to you, This…
I’m sorry, but if you sometimes put spaces around parentheses and sometimes you don’t, I just can’t be your friend any more. I’m talking about source code writing style of course, or rather lack of it. Whenever I open some file that looks something like this … … I get a sudden urge to punch however wrote that in the face. If you are writing code like that, you…
You may have noticed, in recent months, that some search results on Google have extra stuff displayed next to the regular title and small text that we are used to. Some even have images displayed! So, what’s this all about? There are actually two different things going on. One thing are schemas (more on them later) and what you see on the image above is a Google-only trick, that allows you…
Let’s face it, Hacker News could do with a make over and some new features, but I don’t think that that’s going to happen anytime soon. So I’ve decided to scratch one of my own itches with it and made a new extension for Chrome: HN Favourite Users. What it does is highlights your favourite users on any HN page that you are on. Nothing fancy really but it gives me a feature…
There’s a lovely new event coming up here in Ljubljana, aimed at women who’d like to learn programming. Apparently this has already been done across the globe and it’s been quite a success. Rails Girls is a two-day workshop for women who don’t have any experience with programming, and the aim is to introduce this subject to more females in hopes that the IT world…
You are looking at a new design for this page. The old one was really, well … old. And it gave me a perfect opportunity to play around with Twitter Bootstrap. I must say that I like this bootstrap thing a whole lot. It’s really amazing when you see what you can come up with in ridiculous small amounts of time. And if you are brain dead as far as design goes (like me) it really can…
In the first part of this post I talked about how you can minify and combine your CSS and JavaScript files. Now, let’s have a look at the rest of the items: compress cache serve from cookie-less domain Compress .js and .css files Again, smaller is better and with flicking the right switches in your web server you can save a lot of bandwidth and download time for your users. Since there are…
I’ve been using OSX for almost a year now which, naturally, makes me an expert on all things OSX and gives me the right to rant about it. It’s been a mostly pleasant year, but there are some issues with this god-sent operating system. The single most annoying thing about OSX is how it’s handling USB keys (or any other external storage for that matter). I really want to smack…
In the world of front end optimization you will want to start with how you serve CSS and JavaScript files. Same rules can be applied to both types of files: minify combine compress cache serve from cookie-less domain In this first part I’ll explain the first two items from the list: Minify .js and .css files Minifying your CSS&JS files will reduce their size which means that clients will be…
If you are using Google Analytics you’ve probably noticed that it sets a bunch of cookies on your computer. They have to set those cookies to be able to track users activity on your page. But unfortunately this has a rather annoying side affect of always sending those cookies as part of the request when user navigates your web page. That means that if you host all your assets (images, css&js…
Optimizing front end performance of your web page is both a hard and really rewarding job. Hard because there are so many things you have to take care of. And rewarding because you will gain a lot more out of it than optimizing your back end (most of the time spent rendering a web page is spent in the browser). And speed does matter when it comes to web pages.
As any developer working with SQL will tell you, sometimes some queries are just slow and there isn’t much you can do about it. MySQL’s InnoDB can be painfully slow at inserts for instance. I was recently dealing with this exact problem and after some thinking I’ve came up with a really nice solution that offloads slow inserts to the background. The end result is that the user…
I’m a big fan of open source software, my job would be totally different if it wouldn’t exist. So I am really super excited because my boss granted me 4 hours a week to work on any OS project I find interesting. The plan here is for me to learn some team work and to give back to the community that has given us so much. Yesterday was the first day of my endeavor.
I forgot to write about this. I’ve made a simple PHP5 class that you can use to check web pages if they contain various string(s) (you can also use regular expressions). I’ll just copy/paste the description from the project’s github page: I often build a “debug” sub-page on my projects that list various things about the state of the web page (memcache keys, memory…
There was a thread on Hacker News recently that captured my attention. User secos suggested that we make November “launch an app month”. The idea is that you *have to* create a new application or launch one that you are already working on, by the end of November. The premise being that a lot of hackers work on some great idea but never release it because it’s , in their mind,…
I’ve created a GitHub repository for my 10k Apart challenge entry FuglyDo5 (more about that in my previous post). You can find/fork the repository here.
I’m working on a new extension for chrome, which will add, now missing, functionality to Facebook. The extension uses a “content script” which is only run on URLs that match a certain pattern and it also loads a CSS file which has some styles for the elements I inject into the page. But I had a problem that the CSS simply did not load and no amount of googling helped me resolve…
I often have problems keeping up with the huge amount of comments on Hacker News submissions, so I developed a simple Google Chrome extension that shows which comments are new. It works on individual items and on the “threads” page. You can install the extension from the Google Chrome extensions page. I’ve also decided to put the code on GitHub so feel free to fork and improve…
I’ve decided to open a GitHub account so I can keep track on what’s happening with my favourite projects. I’ve also decided to create some projects of my own there. So here it is my first GitHub repository: Chrome badge animator. It’s just a simple JavaScript class you can use if you are building Chrome extensions. I have already posted about it some time ago. Nothing…
An Event Apart has put together a 10K Apart challenge in which participants must write a fully functional HTML5 application while using only 10K. I had to take part, so I’ve made a simple, totally unoriginal and ugly todo app called FuglyDo5 (I’ll appreciate a vote). It uses some new HTML5 tags some basic CSS3 and localStorage so that data is persistent across browser sessions. You can…
By I, I mean we, and by we, I mean me and my boss. And by me and my boss, I mean everybody who manages other people or their experiences of whatever sort. For example, you walk into a groceries store and immediately see 10 things that are just wrong or plain old stupid. And you think: “if I ran this I’d be so much better”. For instance, I would open the second (and the third),…
Working in IT, I’m painfully aware that technology I learn about today can, and most probably will, be obsolete tomorrow. And I’m quite happy with that as it gives me reason to learn new stuff constantly. But recently I was reminded that even stuff that you think you know and generally doesn’t change can … well change, some APIs change constantly and you have to re-learn…
I was in the office almost all day this past Sunday. Many people asked me: “why”? Here is my answer: I love what I do, I don’t consider my work as a job but something I do because I enjoy it. The fact that I’m living off of it is just a bonus. It never ceases to amaze me, how almost nobody I know, outside of my colleagues, likes what he is doing.