März 2014

So Mo Di Mi Do Fr Sa
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          

Tags


The Whitepaper called XSS Street-Fight: The Only Rule Is There Are No Rules by Ryan Barnett is really enlightening. It brought me to the idea of writing a small JAPH for Javascript ;-).

(_=(___=-~-~-~-~-~-~$)&&"")+(__=!$+$)[_=___*___]+({}+$)[___+-~$]+"\x68"+(__)[_/_]+(!''+$)[-~$+~$]+(__)[-~$+___/-~-~$]+({}+$)[___+-~$]+($+'')[_-___]+"\x48"+($+'')[_-___]

To see what this does, execute this script on a blank page (about:blank) within Chrome. Other browsers may not return the things I'm retrieving here, however it would be possible to alter that line to work with them.

Many people use databases. In fact, they're quite a lot since you need to store your applications data somewhere. They create a database, some tables with columns (but keep the amount of tables low even if they could use more, without reasons) and store their data in it. Sometimes they add indexes, but very often only after a performance issue has been discovered in production. And foreign keys. Sometimes. But, you know, they're bad .

Often it ends here, leaving all the rest to the implementation and trying to not forget handling things (eg. last updated date) in each code part.

I often ask myself, and those people, why, oh why they don't use more features of their database?! Features that are developed to perform better in your database, because they can use internals. Features that are used and verified by thousands of people and projects and back huge and important applications.

But when I ask people not using trigger etc., they either respond with one or both of the following:

  • It adds complexity
  • Developers don't know what will happen when they work with data O_O

Ok, let's analyze those two things:

  • Yeah, complexity! Know what? Your application grows over time and you'll add complexity with every new code line. But triggers, for example, can reduce the subjective complexity of your application by absolutely separating code and some logic. Do something, and something else continues, without having to explicitly call a library, start a cron or fork something. It's like event handlers, non-blocking. Every medal has two sides, try to use things so they serve you!
  • To solve this problem by definition, define your database as part of the code base. Triggers, procedures etc. are then part of what developers need to know. But honestly, if developers don't use something they don't get used to it. But on the other side: if they use something, they get used to it! Oh wonder, they eventually will know what kind of triggers are defined, just as they know what cron jobs are running and preparing data. It's your choice and again: use the power given to you so it serves you.

Keep in mind that I don't talk about lifting all your application's logic into the database. While you can do that, it's not something I recommend for a project or team that does not know their database in huge depth. I'm talking about using your application to help you with small parts. It might grow to an application with a huge database usage, but that's your choice.

So. Use the power given to you. Don't retreat into your shell and take off your blinkers.

I'm currently working for PAYMILL as a contractor. I enjoy this project pretty much, I even moved to Munich some weeks ago. Since moving and updating my Xing an LinkedIn profiles to Munich, a lot more recruiters are approaching me for permanent jobs and contracting projects. Their initial emails have something in common: they are boring. Sometimes even worse!

Each mail is talking about a superb job at a superb company, good or "above average" salary and much more. You're unable distinguish between a position that is really boring, a junior position, an interesting job or one at a company (type) you want or don't want to work for. On the other side: not one mail stands out. It's all the same.

You want me to move from my current project to yours? Or even move people from their permanent position to yours? Esp. permanents in Germany don't change their employee very often, this is something you know, so it's hard to make them moving and you don't do anything to make it easy for them.

Enough ranting, coming to the tip. What would I like to see in a mail about a project? Show the facts to save me and you from wasting time:

  • Be clear about the type of company since you cannot call them by their name: is it a startup? If so, how old? Or a big company? I may not want to work for a young company or a too big one. Interesting fact, don't leave this out!
  • What salary is to be expected? Yes, this is still a vey interesting point, even if you cannot name specific figures. It's making me clear in a second if it's worth answering.
  • Save your meaningless buzzwords and superlatives for later and someone else! I don't want to work for a "top company in a top position at a top location"! (Yes, I really receive such mails!!!) I mean it! This one makes me really angry...

Thanks for listening. If you have an interesting job don't hesitate to contact me (although it will be hard for now to make me move). But please, keep the things mentioned above in mind! :-)

Matthias

Moving PostGIS databases between machines with the same PostGIS versions is no hassle. But when one of those systems has a different PostGIS version, things aren't working easily. Today I had this issue: my old MacBook Pro had a different version that my new MacBook Air.

Travis Cline had the same issue some years ago, wrote a nice blog post about it and attached a small python script that solves this issue. See the post here: http://traviscline.com/blog/2010/04/28/moving-postgis-databases-between-machines or find the gist of the script at https://gist.github.com/380278.

text-overflow: ellipsis; is great for text lines that may be longer then the parent element, eg. for shop article names or user names. But there is currently no solution for paragraphs that are longer than the parent. Of course you can set overflow: hidden;, but that will just clip the content/text.

Today I stumbled upon a blog entry by David DeSandro in which he show the use of -webkit-line-clamp which "limits the number of lines of text displayed in a block element". Sadly this is only possible within WebKit browsers (Safari and Google Chrome).

Entering Clamp.js. Clamp.js is a small Javascript that mimics this behavior in other browsers and sets the appropriate CSS for supported browsers. All you need is:

$clamp(document.getElementById('clamp-this'), { clamp: 'auto' });

Works. Nice. Thank you, Joe.

Nice browser stats
Let's see how long this will last ;-)
Nice grace:



via jitro.org

Wie man an diversen Stellen mitbekommen konnte, arbeite ich seit November letzten Jahres für ein Berliner Startup mit dem Namen UNUSUALS. UNUSUALS ist ein social network für die weltweite Werbefilmindustrie. Wir bauen momentan die Seite von Grund auf neu mit vielen weiteren und tollen Features.

Hierbei suchen wir als Unterstützung einen motivierten Software Engineer bzw. Web Developer zur Festanstellung, entweder in Ludwigsburg (bevorzugt) oder Berlin. Wenn du die Fähigkeit hast, schnell und mit dem Job zu lernen, mehrere Programmiersprachen beherrschst und deine Arbeit liebst, würden wir gerne mit dir sprechen.

Geforderte Fähigkeiten:
  • Erfahrung mit einer Scriptsprache wie Perl, Python oder Ruby
  • Erfahrung mit Datenbanken wie PostgreSQL oder MySQL
  • Erfahrung mit HTML, CSS und Javascript
  • Wissen, wie das Web funktioniert
  • Fähigkeit, ein Linux System zu bedienen
  • Fließend Deutsch oder Englisch sprechen und schreiben
Wünschenswerte Fähigkeiten:
  • Erfahrung mit Modern Perl wie z.B. Catalyst, DBIx::Class etc.
  • jQuery, HTML5, CSS3
  • Fähirgkeit, ein Linux System zu administrieren
  • Erfahrung mit Amazon Web Services wie EC2 und S3
  • Aktivitäten im "social web" (Facebook, Twitter, last.fm, ...)
UNUSUALS bietet dir eine Möglichkeit, in einem großartigen und wachsenden Startup zu arbeiten. Wir geben dir Raum zum Wachsen sowie die Möglichkeit, deine eigenen Ideen und deine Kreativität einzubringen.

Wenn du interessiert bist, sende bitte eine Bewerbung in Deutsch oder Englisch an jobs[at]unusuals.net. Beispiele deiner Arbeit, evtl. Code-Auszüge, sind sehr willkommen!

As you may already have noticed I'm working for a Berlin based start-up called UNUSUALS since November last year. It's a social network for the worldwide commercial film industry and we're doing a rewrite from scratch with tons of new features and awesome stuff!

For this to accomplish, we're searching a motivated Software Engineer/Web Developer to join us. The workplace will be in Ludwigsburg (preferably) or Berlin, which are both in Germany. If you're able to learn quickly on the job, pick up multiple programming languages and are passionate about your work, we'd like to talk to you.

Required skills:
  • Experience with a scripting language like Perl, Python or Ruby
  • Experience with databases like PostgreSQL or MySQL
  • Experience with HTML, CSS and Javascript
  • Knowledge of how web stuff works
  • Ability to use a Linux system
  • Fluent in speaking and writing German or English
Optional skills, which are a plus:
  • Experience with Modern Perl stuff like Catalyst, DBIx::Class and the like
  • jQuery, HTML5, CSS3
  • Ability to administrate a Linux system
  • Experience with Amazon Web Services like EC2 and S3
  • Active in social web (Facebook, Twitter, last.fm, ...)
Working at UNUSUALS is a big opportunity to work within an awesome and growing start-up. You'll have room for growth as well as the possibility to bring in your ideas and values.

Please send a copy of your resume in German or English to jobs[at]unusuals.net with some examples of work you've done and/or code samples.

Ever wanted to count the lines of code you’ve written in a project? I guess you have and you may came to a solution that was build by yourself. It worked, but not more.

Today I stumbled upon CLOC — Count Lines of Code — that is a small Perl programm which does a fair good job at counting, recognizing comments, empty lines and so on. It also finds out in which language each file is written (by file extensions). There are also plenty of options to ignore folders (like .git or externals) or files by regex (like single Javascript libraries).

A simple check looks like this:

Check out this project on sourceforge and give it a try. Installing is painless: Just download the file and you’re done! http://cloc.sourceforge.net.