December 2012

Warning! Some information on this page is older than 3 years now. I keep it for reference, but it probably doesn't reflect my current knowledge and beliefs.

22:58
Fri
21
Dec 2012

Zootool - My Favourite Bookmarking Service

I gather and share stuff in many different ways. I post short messages on Twitter, write longer posts on this blog, publish even longer articles as Publications, upload photos to Picasaweb and videos to YouTube. But there is another category of things I like to (mostly) collect, search, access from any place and (maybe also) share - bookmarks to interesting Internet addresses, whether whole websites or specific articles.

Years ago I used TXT files for that purpose. I still use them a lot, but for bookmarking I switched to Delicious some time ago. Then the company was bought by Yahoo and the page started working slower and slower, I don't remember what else but somehow I decided to look for another social bookmarking service. That's how I found Zootool - the service I now use and recommend.

It works like this: First you create your profile. You can set your avatar and fill information about yourself. Then you start bookmarking stuff. You can do it via web interface, but they recommend installing a plugin, available for Safari, Chrome and Firefox, which allows adding bookmark to your "Zoo" as you visit some webpage. You can then open "My Zoo" to see, search and edit your bookmarks using nice, asynchronous interface (AJAX-based - does not reload entire page on every click).

When it comes to features, it's quite standard. Every bookmark has a title, description, URL and tags. Bookmarks can also be made private - invisible on your public profile. The service also offers export, import and JSON API. The company makes money from selling Pro Membership. I wish them many customers and lots of money, but for me the features of free account are sufficient. The only thing I don't like about this whole service is that they generate and show a big screenshot of every bookmark on someone's profile, even in RSS channel and there is no way to switch to more compact list. Anyway, here is my profile on Zootool and I also recommend this service for everyone of you who collect bookmarks to interesting places on the Web.

reg @ Zootool

Update 2012-01-15: After reading comment from Hern (thanks!), I switched to Pinboard. That's another bookmarking service and will now be my favourite. It's not free - registration costs 9.99 USD and the web interface doesn't look very attractive, but otherwise it has all the features I aforementioned plus some more, like marking bookmark as "Unread" to be able to show a "TODO" list of pages to read in my free time, which I implemented before using "foo" tag :) So now I'm reg @ Pinboard (RSS).

Comments (0) | Tags: web | Author: Adam Sawicki | Share

22:00
Wed
12
Dec 2012

Particle System - How to Store Particle Age?

Particle effects are nice because they are simple and look interesting. Besides, coding it is fun. So I code it again :) Particle systems can have state (when parameters of each particle are calculated based on previous values and time step) or stateless (when parameters are always recalculated from scratch using fixed function and current time). My current particle system has the state.

Today a question came to my mind about how to store age of a particle to delete it after some expiration time, determined by the emitter and also unique for each particle. First, let's think for a moment about the operations we need to perform on this data. We need to: 1. increment age by time step 2. check if particle expired and should be deleted.

If that was all, the solution would be simple. It would be enough to store just one number, let's call it TimeLeft. Assigned to the particle life duration at the beginning, it would be:

Step with dt: TimeLeft = TimeLeft - dt
Delete if: TimeLeft <= 0

But what if we additionally want to determine the progress of the particle lifetime, e.g. to interpolate its color of other parameters depending on it? The progress can be expressed in seconds (or whatever time unit we use) or in percent (0..1). My first idea was to simply store two numbers, expressed in seconds: Age and MaxAge. Age would be initialized to 0 and MaxAge to particle lifetime duration. Then:

Step with dt: Age = Age + dt
Delete if: Age > MaxAge
Progress: Age
Percent progress: Age / MaxAge

Looks OK, but it involves costly division. So I came up with an idea of pre-dividing everything here by MaxAge, thus defining new parameters: AgeNorm = Age / MaxAge (which goes from 0 to 1 during particle lifetime) and AgeIncrement = 1 / MaxAge. Then it gives:

Step with dt: AgeNorm = AgeNorm + dt * AgeIncrement
Delete if: AgeNorm > 1
Progress: Age / AgeIncrement
Percent progress: AgeNorm

This needs additional multiplication during time step and division when we want to determine progress in seconds. But as I consider progress in percent more useful than the absolute progress value in seconds, that's my solution of choice for now.

Comments (2) | Tags: math rendering | Author: Adam Sawicki | Share

20:09
Sun
09
Dec 2012

Silly Venture 2012 - My Photos

7-9 Dec 2012 in Gdańsk, Poland, another interesting event took place - Silly Venture 2012 - Atari demoscene party. Here are my photos:


Silly Venture 2012 @ PicasaWeb

Although I'm not a fan of Atari platform, as I'm too young to remember the time when it was commonly used (my first computer was 286 PC), I like this kind of events because of nice people I can meet there and the "demoscene spirit" that can there be felt.

I must also admit that the Atari demoscene looks very strong. They have several parties in Poland every year (Głuchołazy, Grzybsoniada, Silly Venture, ...) and lots of productions submitted to many different categories in the competition. This party was international - there were people from Finland, Czech Republic and other countries and all the official announcements, as well as intro videos were in two languages - Polish and English.

The party was very well organized, especially comparing to RiverWash or WeCan multiplatform demoparty. It was in a school where lots of chairs and tables available allowed to bring, setup and present many computers, a classroom was adapted as sleeping room, we were given paper voting forms so we could enter our votes as we watched the productions, we had unlimited beer, limousine ride and other atractions - all included in the ticket fee... So, thanks a lot and see you next year!

Comments (1) | Tags: gallery atari demoscene events | Author: Adam Sawicki | Share

20:25
Wed
05
Dec 2012

Nearest-Neighbor Filtering in HTML

In 3D graphics programming, when a texture is enlarged, sampler performs filtering to interpolate between texture pixels. That's also what happens by default when an image is resized on HTML page - browser does some interpolation (e.g. bilinear or bicubic), which makes the image blurry.

What if you have a small pixel-art image and you want to show it on a web page as pixelated, not blurred? It turns out there are nonstandard CSS attributes for this. I found these two - first one is for Internet Explorer and the second one works in Firefox.

-ms-interpolation-mode: nearest-neighbor;
image-rendering: -moz-crisp-edges;

Comments (2) | Tags: webdev css html | Author: Adam Sawicki | Share

STAT NO AD [Stat] [Admin] [STAT NO AD] [pub] [Mirror] Copyright © 2004-2017 Adam Sawicki
Copyright © 2004-2017 Adam Sawicki