Subscribe: outbreak
http://friedcellcollective.net/outbreak/feed/atom/
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
app  cache  code  css  data  don  good  make  means  might  page  people  recently  request  resources  simple  time 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: outbreak

outbreak



bursts of ideas and rants by the alterego



Updated: 2017-09-19T17:16:49Z

 



On meetups

2017-09-19T17:16:49Z

I’ve recently been to a few meetups that were almost a complete waste of my time. The talks themselves weren’t necessarily bad, but it showed they weren’t managed and more often than not, most of the crowd leaves after the talks so there’s no networking opportunities either. That might sound a bit harsh, but I […]I’ve recently been to a few meetups that were almost a complete waste of my time. The talks themselves weren’t necessarily bad, but it showed they weren’t managed and more often than not, most of the crowd leaves after the talks so there’s no networking opportunities either. That might sound a bit harsh, but I always felt that as the organiser of an event (I was involved with Spletne urice – a weekly meetup – for quite a while) my job is to provide people with as much value as possible to show that I respect their time and effort to come sit in a hall for an hour or so and listen to something I consider important/relevant[1]. Preparation and curation As we didn’t have meetups during the summer (less people in town + our space was closed), this meant that every season would start off with me going through all the possible topics I could think of that I felt had developments relevant to the community, brainstorm topics with other senior people in the community and then thinking of companies and people who could be good at presenting these topics. Convincing and scheduling Unfortunately Slovenians don’t really want to speak in public too much, so a lot of time was spent convincing people to actually present. If I started the season with 20 topics and people I could start at the beginning of the season and when people said “maybe in a few months” I set a date for them and kept reminding them. This was an ongoing thing as new topics and relevant speakers would pop up during the season. Because you can’t fill all the slots this way I had a set of “evergreen” topics and people who can present on them to fill it all up – this also helps in months when you have less time, but it does mean you owe people. Talk management I almost never let people write their own talk descriptions and titles. While I did ask them for a description it was more of a way to see what they want to talk about and the text I wrote was what I wanted them to talk about. This meant that I would give back suggestions on how to make the talk more relevant to the crowd and also to set the expectations – as the meetups were on the broad topic of web technologies, a good narrow description would pull in listeners that would otherwise not have come. For people who have not presented before or felt they might not do a good job I offered even more help – checking their slides, possibly guiding them on how to tweak them for better effect. Sad state of affairs What I see nowadays feels more or less unmanaged and even though that sometimes means some awesome odd-ball talks, it often has the following result: the speaker is chosen from a friends/volunteer list, not a best-of list title and description are ambiguous or even straight up misleading the presentation is more of a trial run with not enough though given to the argument the presentation is off-topic the speaker does not know the crowd and the history and nobody helps him/her understand it before the event All of the above means that more often than not these things just waste people’s time and look like the organiser and the speaker have no respect for the time of the people attending. I know this is not true most of the time, but having a bunch of people show up because they are hiring and go to meetups to find new employees (of which there are usually none) only masks the fact that the event should be run better and provide more value to the community[2]. The question then is – if you can’t do a meetup properly, do you find another person or a team to do it better? And if there is no one else, do you want to up your game or just quit? Is something better t[...]



On car configurators

2016-05-03T15:10:12Z

I’ve recently gone into another cycle of find-a-new-car. I do this now and then to stay in touch with what is currently on market and what I could buy if my trusty Civic dies unexpectedly. What I’ve seen (again) is that the state of car configurators and comparison tools has not progressed a lot since […]

I’ve recently gone into another cycle of find-a-new-car. I do this now and then to stay in touch with what is currently on market and what I could buy if my trusty Civic dies unexpectedly.

What I’ve seen (again) is that the state of car configurators and comparison tools has not progressed a lot since I first started seeing them in about 2000 when working on a website for Renault. That’s why I like buying cars from Asian brands (actually Japanese brands) – they have a small number of trims and not a lot of things you can add, which makes for a simple decision process. The european brands however will basically sell you an engine with a steering wheel and a set of wheels and then let you add on whatever you want/need so that you actually buy a car – I’m exaggerating here, but not long ago BMW had manual rear windows in the default trim.

The state of the art seems to be adding numbered codes to equipment and then listing them in packages, sometimes online even notifying the user about the incompatibilities when selected (which is sometimes fun – I still can’t configure a Renault car).

The funny thing when comparing trims/models is the fact that there seem to be no links between items, which sometimes means that you’ll have a “Steering wheel” and some trims will not have it – cause they have “Leather steering wheel” a page lower (intentionally selected these cause you can’t solve this with a sort).

Modelling features seems somewhat simple:

  • title
  • description
  • price
  • includes features
  • not with features
  • applies to models

If you try to normalize this you will quickly notice that it gets highly confusing when you have the same commercial title for a feature pack that includes less features and is priced lower because it only applies to high-end trims.

If you’ve ever done this before you can also imagine this conundrum makes for a very fun UI experience – some features only apply to automatic transmission models, some only to models with a certain engine or number of doors. Let’s not even start with special editions…

What do you do to deal with all this mess?




Three-way CSS-only selector

2016-02-11T11:00:51Z

I was at the Slovenian CSS Meetup yesterday where I did a short talk on Quantity Queries. That’s a name given to a technique where you use pseudo class selectors to discern how many elements are inside a certain element – for example :first-child:nth-last-child(4) {} will only select the first child if there are exactly […]

I was at the Slovenian CSS Meetup yesterday where I did a short talk on Quantity Queries. That’s a name given to a technique where you use pseudo class selectors to discern how many elements are inside a certain element – for example :first-child:nth-last-child(4) {} will only select the first child if there are exactly 4 elements. If you group that with the general sibling selector ~, you can also get all the other elements.

The idea of quantity queries has been around for a year or so and even though at first glance you might say “We’ve got flexbox for that now”, you’d only be right in certain cases. The thing that quantity queries bring to the table is the idea of being able to change the styling depending on the number of elements, which I guess people currently solve either on the backend or with javascript.

But that’s not the main reason I’m writing this – it’s the last talk of the night where a three-way selector solution was presented by Gorazd. He created a CSS version but had problems with the smoothness of the animation as he didn’t know where the selector was before the selection to move it to the selected position after a user interaction. He resorted to using javascript that basically only did some class switching. This immediately gave me an idea that a sibling selector could be used for that if the indicator had the same parent as the inputs and was positioned after them in the code. And today I made a proof-of-concept solution I’m calling “the three-way CSS-only selector”.

style="height:50px" src="http://friedcell.si/outbreak/wp-content/uploads/threeway.html">

It uses three radio buttons, so the form is perfectly submittable, the labels also select properly, it animates properly and does not use javascript. It’s only been tested on the browsers I have on my Mac, so I can easily see it breaking in IE or mobile browsers – if anyone wants to fix that please go ahead and ping me to add your solution to this post. You can also check the solution on JSBin.




The airport confusion

2015-05-18T23:24:58Z

Frankfurt airport confuses me. I never know when I’ll have to go through security and when it’s only going to be border control. This means that I don’t really like flying through it as I don’t know if I can buy stuff at airports on the way in and Fraport is losing money. Same thing […]

Frankfurt airport confuses me. I never know when I’ll have to go through security and when it’s only going to be border control. This means that I don’t really like flying through it as I don’t know if I can buy stuff at airports on the way in and Fraport is losing money. Same thing goes for shops at the airport – even store clerks don’t know if I need to clear security again. And I don’t like the idea of throwing away a 50 EUR bottle of rye bourbon.
If they offered a service that would, based on the date of travel, origin and destination airports, tell me which gate I might arrive at and fly out of as well as what kind of controls I’d have to go through and which shops are on my way I’d like it more.




My ideal commuter bike

2017-09-19T17:14:35Z

I’ve been thinking about this for a while now and we’re getting closer but not there just yet. Since a few people have asked me and I always forget something I’ll list all the features here. Must haves beside wheels, frame, forks, saddle, pedals, handlebars and a reasonable price: breaks front & back (disks a […]

I’ve been thinking about this for a while now and we’re getting closer but not there just yet. Since a few people have asked me and I always forget something I’ll list all the features here.

Must haves beside wheels, frame, forks, saddle, pedals, handlebars and a reasonable price:

  1. breaks front & back (disks a plus)
  2. fenders front & back
  3. internal gear hub
  4. chain cover
  5. reasonable weight

Optionals:

  1. lights front & back
  2. hidden break and shifter cables
  3. rear rack

You can get the lights, but it’s way nicer if they look the part, cables inside the frame make the bike look nicer and a rear rack is useful for schlepping stuff around.

I’ve recently done another search and found that Schwinn Brighton comes close – it has all the must-haves, but unfortunately it’s not available in Slovenia.

Update: I found this bike in Cube Town Pro black 2017.




Shipping

2014-10-05T19:01:47Z

When we stared a hardware startup, I hoped that at least the logistics and shipping would not be a problem – from all the global shipping companies to all the fulfillment companies surely it’d be a breeze. Oh how wrong I was. Since then I found out that delivery guy ignorance and package mishandling doesn’t […]

When we stared a hardware startup, I hoped that at least the logistics and shipping would not be a problem – from all the global shipping companies to all the fulfillment companies surely it’d be a breeze. Oh how wrong I was.

Since then I found out that delivery guy ignorance and package mishandling doesn’t only happen here, it happens elsewhere too. I’ve even been told that the “this side up” sign is ignored, they only care where the label is so it can be scanned fast and automatically.

The prices on their price lists are also out right ridiculous. Most companies I’ve seen only offer fast shipping (1-2 business days in Europe), if you want anything cheaper/slower you go the way of the local post, which is unreliable and can’t guarantee anything (and will usually take 5-10 business days in Europe).

Returning packages is another thing that is far from solved – from the delivery companies to customs officers, so it’s really hard to create a good experience for the customer to return an item free of charge.

As usually with these huge systems you need to get to the people level to get things working – when you’re calling a person not a number, when you call the delivery guy by name everything works. For everything else you try to hack the system to get what you want…




Benchmarking web servers

2014-08-25T14:30:30Z

We recently bought a server at CubeSensors and are now putting it through its paces. One of the things I was looking at was our HTTP server / load balancing setup. We’re currently using an Nginx server in front of Tornado instances and I was wondering if there is something that is more specialized and […]

We recently bought a server at CubeSensors and are now putting it through its paces.

One of the things I was looking at was our HTTP server / load balancing setup. We’re currently using an Nginx server in front of Tornado instances and I was wondering if there is something that is more specialized and thus likely faster that would allow for realtime upstream configuration changes. I found HAProxy.

I did a simple setup on the server (Ubuntu 14.04) to test things:

  • Nginx 1.6.1
  • HAProxy 1.5.3
  • Tornado 4.0.1

Tornado is running a very simple app that only returns OK at /, there’s two of them and both are started with 2 forks (server.start(2)). HAProxy is set up with option http-keep-alive with a 60s timeout and points to the two Tornados while Nginx has two virtual hosts, one linked directly to Tornados with keepalive 4, the other to HAProxy also the same keepalive setting, both with proxy_http_version 1.1 and removed Connection header. Server timeout is set to 30s, client to 10s.

The first idea was to test with ab using something like ab -n 10000 -c 100 URL. On a machine that is running nothing else but the tests, the times were changing way too much from one test to another. I also noticed that ab is making HTTP 1.0 requests.

The second tool I tried is siege, which has a few different options than ab and also makes HTTP/1.1 requests. I used siege -c 1000 -r 100 -b URL and Nginx-Tornado combination manages a 50% higher transaction rate than any combination with HAProxy. But I think this says more about my ability to configure HAProxy than it does about HAProxy itself – I keep getting a bunch of stale connections (in TIME_WAIT state) hanging around even with option forceclose.

Resolution: sticking with Nginx. It can log POST body, upstream configuration changes will be handled by including the upstream configuration which can be changed and reloaded.




Security questions

2013-09-23T20:38:31Z

I was just asked two security questions by Apple after trying to buy an app. Apple says it’s the first app on this device, but what they really mean is “the first app on this device with iOS7”. I didn’t know the answer to any of them so I now have to reset them and […]

I was just asked two security questions by Apple after trying to buy an app. Apple says it’s the first app on this device, but what they really mean is “the first app on this device with iOS7”. I didn’t know the answer to any of them so I now have to reset them and who knows what else.

I have no idea who decided that security questions were a good idea in the first place. The answer to the question can usually either be easily researched (maiden names, first teachers, first cars,…) or hard to remember. The first one is a problem because then they don’t really provide any security, only add friction to the process.

Remembering the answers is a bigger problem because of a few reasons. Some of the questions are hard to answer in the first place – I for one have no idea what my first concert was and even if I think about it I have no idea if when setting the answer I thought the one at school counts or was it the first one I bought tickets for myself, which band did I write or did I wrote all of them in what order and in what form. Geographic questions are also much fun because you never know how local your answer was – was it the street, town, county, state,… And because of the first issue, the easily researched questions get tricky answers that you never again remember unless they are really obvious, which again makes them easily breakable.

I can see some value in these kinds of questions when there is a person on the other side, but only if that person is trained to recognize people that make up stories and lie. But this doesn’t happen very often.

So if you want something to be secure, make users select stronger passwords. Don’t add shit that doesn’t add security but problems.




Work for food

2013-06-04T21:04:23Z

I’ve recently been exposed to two different local companies looking to get work done for what is essentially free. Ads The first one was a request by a reputable event venue looking for the visual identity for an international Jazz festival. Their posting vas very raw, saying only what they want (a poster) and what […]I’ve recently been exposed to two different local companies looking to get work done for what is essentially free. Ads The first one was a request by a reputable event venue looking for the visual identity for an international Jazz festival. Their posting vas very raw, saying only what they want (a poster) and what they give in return (tickets to the festival and a t-shirt). The second one was a request by a PR agency for a month long stint doing “PR and Event Management”. The posting is humorous and very well written (PR agency, remember?) and also includes a list of what they want (full day of hard work) and what they give in return (lunchmoney). Interpretation As usually both postings leave a lot of room for interpretation and of course people base their interpretation on their feelings towards the company. To make things even I’ll try to make two interpretations for both – one optimistic and one pessimistic. Optimist The first request is targeted at aspiring designers who have either just finished their studies and cannot find work or are trying to find work as designers even though they studied something else. Maybe they’re just Jazz fans trying design while unemployed. Since the event organizer has a team of internal designers they’re not actually looking for all the applications (logo, poster, booklet, tickets,…) – they want a poster that communicates an idea (agencies will tell you that ideas are hard to come by, entrepreneurs will sell them a-dime-a-dozen). Since designers are usually hired based on their portfolios (preferring published work) winning this could jumpstart a career. It could even possibly lead to a job for a music label or another, bigger music festival. The second request is targeted at people who know that in PR and Event Management it’s all about who you know and who you’ve worked with. This means that working for a company on multinational accounts can lead to a job in either this same company or at the multinationals – which could get you far. The company is only asking for a month of “free” work and is actually using this as a testing period for a full-time hire after the month expires. They’re a good standing company with loads of work and the salary is great. Since you’ll be working a lot with a great bunch of people you’re learn so much that after the month is over you’ll not only have the offer from this company, but from at least three more. Pessimist The first request is a way to get a free visual identity because they want to fire the internal design team as soon as possible. The winner will have to do all the applications for free after he wins and the tickets will be the worst you can possibly get for a concert, while the t-shirt will be of the wrong size. They will not allow you to sign your work or advertise that you did it. The second request is a way to pay less for people who will pass out flyers at events, make coffee and type CEOs recordings of PR notices. It also includes sending PR emails from to media and journalists and reminding them every day until they publish. Since you’ll be working hard all day there won’t be any time for mentoring or observing what others do and after you’re done coworkers won’t even remember your name. But… People who supported one and not the other were probably thinking of one as a pessimist and the other as an optimist. Knowing the companies they might be right, but [...]



A website is usually not just one product

2012-05-15T08:55:09Z

By releasing Inside government we were testing a proposition (‘all of what government is doing and why in one place’), and two supporting products (a frontend website and a content management system). Ross Ferguson People usually forget this. When you don’t, your project has way more chances to succeed.

By releasing Inside government we were testing a proposition (‘all of what government is doing and why in one place’), and two supporting products (a frontend website and a content management system).

Ross Ferguson

People usually forget this. When you don’t, your project has way more chances to succeed.




Preloading resources

2011-10-03T09:06:11Z

You might have read that when optimizing your site for speed HTTP requests are something to look at – less requests mean less waiting and usually a faster site. When doing that for CSS you’re faced with a dilemma: Put all of CSS in one file, which means less requests, but also means that the […]You might have read that when optimizing your site for speed HTTP requests are something to look at – less requests mean less waiting and usually a faster site. When doing that for CSS you’re faced with a dilemma: Put all of CSS in one file, which means less requests, but also means that the first time people land on your site, they will wait longer than needed to see the content which could mean a ruined first impression. Put CSS in per-section files, which means less loading up front but more request as people drill down into different sections of the page. When using the first option your only focus can be on how to optimize the CSS so that it loads as fast as possible and is as small as possible. As you have less files you can easily have that file minified and gzipped even if you’re not using a deployment solution that will do that for you. Using the second variant gives you more options – you should still optimize the files, but now you have the option of deciding when to load them to make sure that the landing page does not get hit by the added request. Even though I started with CSS preloading can be done for any resources needed on the page – fonts, scripts, images. When to preload? An very obvious case is a search results page. It usually has a very distinct design that requires certain resources not needed anywhere else. But that’s not enough – you need to know when the user will these resources so you don’t go preloading everything just in case. With search it’s when they focus inside a search box – they start typing the query, while you start preloading the resources in the background. Other obvious places to preload resources: My account – when users click log-in or focus into the login form Checkout – when users add stuff to their cart Other less obvious places are landing pages when the choice a user makes turns into many sub-options, especially when products have the same resources used on the content pages. To the code! If you’re already using a library it probably provides AJAX methods and event methods. If not, you can search MicroJS to find one and adapt the syntax. A simple preloader is almost as simple as helloWorld – the only thing you need to make sure is that the type of data type is set to text so that it does not get executed. window.preload = function (src) { $.get(src, null, null, 'text'); } // call with preload('somefile.css'); If you want to allow the loading of multiple files at once you can detect if the passed element is an array. window.preload = function (data) { var a = $.isArray(data) ? data : [data]; $.each(a, function (i, n) { $.get(n, null, null, 'text'); }); } // call with preload('somefile.css'); // or preload(['somefile.css', 'otherfile']); If you prefer to call the function with many parameters you can just use arguments in the each function call. window.preload = function () { $.each(arguments, function (i, n) { $.get(n, null, null, 'text'); }); } // call with preload('somefile.css'); // or preload('somefile.css', 'otherfile'); Key element is to load the resources after the window.onload has happened – this means that any resources needed for the page to function properly have been loaded. If you do stuff sooner you might have to wait for other resources like fonts, images, videos. This means you need to know if the onload event happened – if it has, preload immediately, o[...]



Taking your webapp offline

2011-08-21T21:05:39Z

I’ve recently done a few things that would benefit from having an offline mode. Empowered by Appcache Facts I tried to make the newly published La Vuelta 2011 results page an offline-capable app. Goal The goal of this exercise is twofold: To force caching of resources that slow down the loading of your page. To […]I’ve recently done a few things that would benefit from having an offline mode. Empowered by Appcache Facts I tried to make the newly published La Vuelta 2011 results page an offline-capable app. Goal The goal of this exercise is twofold: To force caching of resources that slow down the loading of your page. To actually be able to use the app when offline. Solution It’s as simple as writing a cache manifest. It pays to name it [something].manifest, as Apache already serves the correct header with that suffix. What you do is list all the files you want cached, add stuff you allow on the network (check Appcache Facts and Dive Into HTML5 – Offline Web Applications) and it all works. Except it doesn’t. CACHE MANIFEST # version 1 CACHE: resource NETWORK: * http://* https://* AJAX stuff If you’re using AJAX to get data from a server using jsonp/script, your framework of choice (jQuery in my case) will probably default to using a no-cache approach to loading it. This will mean that it will request the file + some suffix to prevent browser caching. This will mean that the resource will not be available if you’re actually online. You can use navigator.onLine to switch cache on/off, but I suggest you first try requesting the no-cache resource and if it errors out, request the cached resource. The benefit is that even if you are online but the server is not, the users will still see the data / use the app. $.ajax({ dataType: 'script', url: 'resource', cache: false, success: successHandler, error: function () { $.ajax({ dataType: 'script', url: 'resource', cache: true, success: successHandler }); } }); iPad issues Fixing the AJAX meant that it worked properly on the desktop (test with Firefox that has offline mode) and in Safari on the iPad. The trouble started when I added the app to Home Screen – data failed to load. It was the same app as in Safari and it should have worked. After some debugging I found out that the data actually was loaded but the eval failed (I was using $.getScript). Some weird testing showed that the problem was a newline character in the data. As I really liked the newline there I added some code to the error handling that removed the newline and evaled the data, then ran success. And it worked! $.ajax({ dataType: 'script', url: 'resource', cache: false, success: successHandler, error: function () { $.ajax({ dataType: 'script', url: 'resource', cache: true, success: successHandler, error: function (xhr) { eval(xhr.textResponse.replace(/\n/g, '')); successHandler(); } }); } }); Debugging It’s somewhat hard to debug offline stuff. I suggest using a clearly visible version indicator in the file to make sure you know which version of the file you’re looking at. Also remember that the first time you load the app after changing the file & cache manifest it is served from cache. At the same time the manifest is checked and on the iPad the files are downloaded after everything else is done (app finished loading and rendering). It works! After these problems were solved I used the aforementioned navigator.onLine to hide stuff that normally comes from the network but is not relevant to the offline app (banners, share links, like/+1 buttons) and you can now check the La Vuelta 2011 results page. [...]



Form protection

2011-08-05T14:35:34Z

I’ve seen a discussion recently on how to protect your forms from spammers/bots that come and fill the forms to either fill your database with crap data or fill your page with porn links. When I read the answers I figured out that none of the people read the amazing article I did years ago, […]I’ve seen a discussion recently on how to protect your forms from spammers/bots that come and fill the forms to either fill your database with crap data or fill your page with porn links. When I read the answers I figured out that none of the people read the amazing article I did years ago, so I decided to try to remember what it said. So, a big fat disclaimer: I read this in an article somewhere and I don’t remember where. If you know the original article please post it in the comments, I’d love to link to it, I bet it has way more info than this one. The problem Almost all websites now have some forms on them, some of them are contact / registration forms, others use the data submitted and display it on the site itself (comment forms). But letting others submit data to your site/database opens you to all sorts of attacks. If you actually show the content of the submitted form, you’ll get a bunch of spammers posting comments with lots of links. If you only store data and not show it anywhere you’re still at risk – if you don’t notice your disk can fill up, your database may grow beyond its limits,… So what we want to do is to prevent bogus form posting. Spammer approach If you think about writing a spam-bot that will try to spam as many sites you possibly can you have two basic approaches. Record / replay This is a very simple approach – you use a person to submit the form, preferably with something that looks like real input and record the request made. Then you hand that data off to the bot, it changes some content and tries to resubmit it. Automation based on heuristics I wanted to say AI, but it really isn’t. What it is is a set of simple rules and randomized values that the bot thinks might trick your site into accepting the submit. Let’s say you have three fields, two are inputs with field names “name” and “email” and the third field is “comment”. A simple script can fill these with “valid” data and try to submit it. Human entry By far the simplest, but also most costly for spammers. Go on Amazon Turk or whatever other service, send a link to a Google Spreadsheet and have people manually enter the stuff into your forms. This is the source of “Sorry, this is my job” endings to spam comments. Popular solutions Turing test Add a field to the form that the user must fill with something that humans can do easily, but machines can’t. The biggest group here are Captchas (display an image with distorted characters, possibly an audio link that reads out the same characters, and have the user somehow figure it out and write the solution), but there have been others, like a “Human?” checkbox, or “3 + 4 =” fields, “Is this a kitten?” with a pic next to it. 2-step process Supposedly by far the easiest way to do this is by introducing a 2-step process. After the initial submit, you get back a preview of the submitted data, possibly with a checkbox that says “Is this correct?” and another submit button. Robots are usually not good at following through and thus don’t actually submit the content. Both solutions have an impact on user experience. With Captchas it’s sometimes really hard to see what they are and even if they have a “different image” link, it just seems like the owner of the site wants to make [...]



View Source Alliance

2010-11-19T21:35:47Z

Most of what I learned on the web in my early years was from “View Source”. Then came the books and the conferences. It makes me sad to see lots of sites minifying code for performance and not releasing the full version of the code so other developers could learn from it. It’s the openness that […]

Most of what I learned on the web in my early years was from “View Source”. Then came the books and the conferences.

It makes me sad to see lots of sites minifying code for performance and not releasing the full version of the code so other developers could learn from it. It’s the openness that I really like about the web.

I think there should be a “View Source Alliance” that would set rules on how to release your code in a way that visitors can benefit from the speed of minified code, while web developers can still find your full files and learn from them.

I’ll set a few simple rules here, hoping somebody with more reach picks them up:

  1. If you minify the files for them, use a simple convention name.min.ext (say jquery.min)
  2. When you deploy minified files, also deploy their full version at name.ext (say jquery)
  3. If you for some reason can’t release the full files next to the minified ones, add this to the top of the minified file: /*viewsource*http://path.to/full.ext*/ (say /*viewsource*http://http://code.jquery.com/jquery-1.4.4*/)

This way you will not only help others, but sometimes even stop breaking the law. Because you might be using some open source code with a licence that says you must release your code with a same/similar licence.




Motivation and hiring

2010-11-16T00:13:14Z

I don’t think I ever wrote about motivation much here even though it’s one of my favorite subjects and was also the main topic of my thesis. Recently I’ve been thinking about it quite a lot again and I’ve come to the conclusion that it’s very important to use it to hire the right person. […]I don’t think I ever wrote about motivation much here even though it’s one of my favorite subjects and was also the main topic of my thesis. Recently I’ve been thinking about it quite a lot again and I’ve come to the conclusion that it’s very important to use it to hire the right person. Back to the beginning. There are loads of theories on motivation and most of them just cover different aspects and mostly they can all live together. One of the aspects of motivation is where it comes from. That gives us intrinsic motivation and extrinsic motivation. Obviously it’s not a boolean thing as any individual sits on a line between the extremes. And there’s also the matter of having a different source of motivation for different things. Let’s not get into that. Intrinsic motivation Let me quote Wikipedia on this: Intrinsic motivation refers to motivation that is driven by an interest or enjoyment in the task itself, and exists within the individual rather than relying on any external pressure. We are motivated by the fact that we’re getting something done and by the feeling we get ourselves when we’re done. We’re not in it so someone can tell us we did a good job. We don’t really care. A friend of mine once said: “It’s for me. If somebody else likes it – great.” We like to think that the more we get into the subject, the better we’ll be at it and the better the result. In other words no relying on luck, no shortcuts, no marketing/selling, no subpar stuff. Because of all this we don’t like when others interfere with stuff we’re responsible for. Extrinsic motivation Another quote from Wikipedia: Common extrinsic motivations are rewards like money and grades, coercion and threat of punishment. Competition is in general extrinsic because it encourages the performer to win and beat others, not to enjoy the intrinsic rewards of the activity. These people often need to be “managed” to give them the sense of direction and success and are in that way more demanding. They also need more information about what is going on and might see the successes of their co-workers as their own and be empowered by them. Who to hire? You might want to hire intrinsically motivated people when you don’t have the management layers to keep them motivated or you just don’t have time to do that. On the other hand it’s very hard to keep them motivated when all the fun work is gone and thus tend to either switch tasks/assignments or try to over-explore/discover. These two reasons are also why some people want to hire intrinsically motivated employees only to later regret it as they can’t motivate them anymore or don’t know how. Hiring extrinsically motivated people might be better for cases where you can manage them properly as they might feel lost without guidance. They are somewhat easier to motivate as you have a lot more ways to do it – sometimes even just a public pat on the back suffices. They are surely a better choice for a company in an established market as they thrive on beating the competition. If you have an “employee of the month” you should hire extrinsically motivated people. I think it’s very important to hire a homogenous team motivation-wise. An extrinsically mot[...]



HTML Lint

2010-08-30T12:01:44Z

From Lint Instructions: HTML Lint is a tool that makes sure your code looks good. While XHTML was very strict with syntax HTML 5 is more lenient like previous versions of HTML, which means keeping consistent code styles will become more difficult. Validating is not good enough anymore. HTML Lint is under constant development. If […]

From Lint Instructions:

HTML Lint is a tool that makes sure your code looks good. While XHTML was very strict with syntax HTML 5 is more lenient like previous versions of HTML, which means keeping consistent code styles will become more difficult. Validating is not good enough anymore.

HTML Lint is under constant development. If you find a bug, report it on Twitter.

It started in Seattle, at An Event Apart. Jeremy Keith said in his presentation that validation for HTML5 doesn’t make much sense anymore and that there should be a Lint tool. I started thinking about it and after lunch I asked Jeremy what options he wanted in it. I added some of my own and made the first version of it flying to Phoenix (going to IA Summit) and then fixed it flying back to Ljubljana.

We released the first version soon and updated it with a new design a few days ago. I’ve been putting the update off as I had a few other projects going on, but Jeremy mentioned it at Drupalcon and Remy pointed his htmllint.com to it and tweeted about it. So it had to be done.

HTML Lint was coded in Python by MMM, which consists of me (Marko Mrdjenovič) and Marko Samastur. The design for it was done by Sara Tušar Suhadolc. The source code should be available soon.

(image)