So i installed Redmine with the Redmine-Gitosis Plugin to have better controls over my repositories and projects. This is a good way to have something like github for your company. I'll write a little about their design and why i used Redmine.
Rough comparison of Redmine and Gitorious
Gitorious is designed to work with git as opposed to Redmine which is open for anything you write a plugin for. Also this might seem to be an advantage of Redmine, it's a lack in the Redmine-Gitosis Plugin that makes Gitorious that bit better in handling git.
The main difference in how Gitorious works with git repositories is ActiveMQ. It uses an AMQP Broker to talk to the "backend" which wraps around the git commands.
This is a clear advantage in design, but the Redmine-Gitosis Plugin does it's job with no problems so far.
Gitorious also has the design-advantage that it hooks into the repositories to give a list of all commits across all repositories in your "Home" screen. Redmine doesn't have that yet, but i might write a plugin for that.
So why did i chose Redmine?
I needed a system where i could document issues and have a Wiki plus fine grained role-based Authorization so customers can access the Wiki and Issues but not browse or checkout the sourcecode. Redmine (with plugins) has all of that, Gitorious does not. Gitorious also has plugins for that, but they are not so well integrated as it is in Redmine.
It was also important to have support for foreign (non-local) repositories of any VCS in my issue-tracking. This is not happening with Gitorious.
Why git and not mercurial?
I don't like git. I think mercurial's design is much better (see the Google Code Comparison), but a lot of projects use git and that's that. I know that there's a plugin to use git repositories with mercurial, but that's not production use.
Impressions
After having used Gitorious for a few months and having Redmine for a day, i must say that i am happier with Redmine. The only thing missing is the unified commit-feed over all of my repositories, but i'll work on that when i have time.
They both are better than Jira!
Sunday, February 21, 2010
Thursday, February 11, 2010
First impressions on Apple's Xcode
So after my first iPhone (2G) broke almost 1.5 years ago, i finally got another iPhone a few days back. My dad's company (ESIRION AG) is really busy developing all kinds of fancy webapps, so he asked me if i could work my brain into developing applications for the iPhone. I've already looked at Xcode a year back, so this would be a good opportunity to earn some money with developing mobile applications.
Me and the iPhone
First off, a little story about my luck with iPhones. When i first got my 2G (AT&T) as an early christmas present from my dad right after it came out, i was stunned. Although i had to Jailbreak and Unlock it to use it with my german Vodafone-SIM, i had fun with it. Until one day the Baseband-flash went wrong.
After a few weeks of diddling, flashing and i-dont-remeber, i got the Baseband back working again. Anyhow, the phone died a few weeks later. It just wont turn back on..
That phone aside, i got a used greek iPhone 3G last year, sadly the SIMs-lot is somehow whacky since it sometimes looses network connection or audio during calls (my voice can't be heard anymore).
Since i have like 20 cell-phone shops in walking distance, i started scouting for Android phones since they are more affordable and less dictated. When i finally went into a independent Vodafone-Store, they had an iPhone 3GS 16GB in the showcase. So i asked an employee since when Vodafone has iPhones. The Phone was actually sold by her privately and it was supposed to be "unlocked". Apparently she meant that "it is possible to unlock and jailbreak it". This doesn't help! As a developer i need to be able to use latest/beta firmwares.. so it makes no sense to wait a few weeks or months until a new Baseband unlock is out. Anyway, i returned the phone 60 minutes after i bought it.
Ultimately i am now stuck with the broken 3G where the SIM is whacky. It works as an iPod Touch and for development tho.
Xcode - and everybody was like "yeaaaah!"
So there i was, used to vim, NetBeans, IntelliJ Idea, Scala, Java, Ruby, being stuck with an IDE which is worse than Eclipse. Yes, that's possible! It's components do not only crash for no reason, they also don't seem to do what they're supposed to.
Copy or Reference?
When you copy files from one project window to another (in order to add them to the project), Xcode asks if you want to reference them, or if you want to copy them. I am not sure how many of you just reference everything in your project from outside your versioning, but hey.. there must be some insane reason that by default it does not copy the files, but references them with the full OS path. Sadly, when i copied (!) some files from project A to B and checked the box for copy, it did reference them.
God know's why.. i've had this like 10 times over the past week.
The Interface Builder
I've never felt so disgraced when i saw that piece of GUI crap. Sorry folks, this stuff is more complicated to use than to write it in code.. Except for random crashes, i didn't have any problems with it.. Except the clicking of course.
I can imagine tho, that Interface Builder is a nice way to make design layouts to give developers a better idea of what things should look like. For that part it is simply amazing. Pretty good if you can actually discuss the layout during a presentation and change it to get everyone's feedback right away.
Commenting Code
So i wanted to comment like 500 lines of code. Unless you know that you have to Edit -> Insert Text Macro -> C -> Comment Selection (from a huge list), you're pretty lost. Sure, if you know about Cmd + Shift + 7 this is a piece of cake, but sadly this info cost me 15 minutes of Google Searches.
I find it bad, that you actually have to select the a macro according to your language. Doesn't Xcode know what filetype it's editing? How does the syntax-highlighting module know how to color the code?
Even for a company that is restrictive but flexible like Apple, it's pretty exceptionally stupid to not let people write plugins. Didn't Steve jobs say in his iPad presentation that Apple wants the product to fit the customer, not the customer the product? Then how is it, that i can't customize Xcode to use mercurial or git? I'm sorry but isn't git used in a really lot of projects? Does Apple really believe that someone would start committing his project with images (binary) data and stuff to Subversion or CVS?
Tho i love working in the shell, when i code in an IDE, i want to work with the the VCS of my choice from right within, especially if the IDE is supposed to as "innovative" as Apple always tells us.
Conclusion
After having almost worked two straight weeks in Xcode, i find it daunting to use. Apple's intentions might be good on Xcode (unlike the iPhone and iPad), but it's done in a terrible way.
Also, not having an open plugin support is really nasty since Apple always talks about products that fit the customer, not the other way around.
Anyhow, i will dig deeper into mobile development and may even put more efforts into that area. After i've done some work with Android i'll be sure what phone to get.
I am really looking forward tackel the problems of mobile devices in combination with live-data gotten from Akka-powered Liftweb-Application! This is going to be so interesting!
Best regards!
Me and the iPhone
First off, a little story about my luck with iPhones. When i first got my 2G (AT&T) as an early christmas present from my dad right after it came out, i was stunned. Although i had to Jailbreak and Unlock it to use it with my german Vodafone-SIM, i had fun with it. Until one day the Baseband-flash went wrong.
After a few weeks of diddling, flashing and i-dont-remeber, i got the Baseband back working again. Anyhow, the phone died a few weeks later. It just wont turn back on..
That phone aside, i got a used greek iPhone 3G last year, sadly the SIMs-lot is somehow whacky since it sometimes looses network connection or audio during calls (my voice can't be heard anymore).
Since i have like 20 cell-phone shops in walking distance, i started scouting for Android phones since they are more affordable and less dictated. When i finally went into a independent Vodafone-Store, they had an iPhone 3GS 16GB in the showcase. So i asked an employee since when Vodafone has iPhones. The Phone was actually sold by her privately and it was supposed to be "unlocked". Apparently she meant that "it is possible to unlock and jailbreak it". This doesn't help! As a developer i need to be able to use latest/beta firmwares.. so it makes no sense to wait a few weeks or months until a new Baseband unlock is out. Anyway, i returned the phone 60 minutes after i bought it.
Ultimately i am now stuck with the broken 3G where the SIM is whacky. It works as an iPod Touch and for development tho.
Xcode - and everybody was like "yeaaaah!"
So there i was, used to vim, NetBeans, IntelliJ Idea, Scala, Java, Ruby, being stuck with an IDE which is worse than Eclipse. Yes, that's possible! It's components do not only crash for no reason, they also don't seem to do what they're supposed to.
Copy or Reference?
When you copy files from one project window to another (in order to add them to the project), Xcode asks if you want to reference them, or if you want to copy them. I am not sure how many of you just reference everything in your project from outside your versioning, but hey.. there must be some insane reason that by default it does not copy the files, but references them with the full OS path. Sadly, when i copied (!) some files from project A to B and checked the box for copy, it did reference them.
God know's why.. i've had this like 10 times over the past week.
The Interface Builder
I've never felt so disgraced when i saw that piece of GUI crap. Sorry folks, this stuff is more complicated to use than to write it in code.. Except for random crashes, i didn't have any problems with it.. Except the clicking of course.
I can imagine tho, that Interface Builder is a nice way to make design layouts to give developers a better idea of what things should look like. For that part it is simply amazing. Pretty good if you can actually discuss the layout during a presentation and change it to get everyone's feedback right away.
Commenting Code
So i wanted to comment like 500 lines of code. Unless you know that you have to Edit -> Insert Text Macro -> C -> Comment Selection (from a huge list), you're pretty lost. Sure, if you know about Cmd + Shift + 7 this is a piece of cake, but sadly this info cost me 15 minutes of Google Searches.
I find it bad, that you actually have to select the a macro according to your language. Doesn't Xcode know what filetype it's editing? How does the syntax-highlighting module know how to color the code?
Version Control
Even for a company that is restrictive but flexible like Apple, it's pretty exceptionally stupid to not let people write plugins. Didn't Steve jobs say in his iPad presentation that Apple wants the product to fit the customer, not the customer the product? Then how is it, that i can't customize Xcode to use mercurial or git? I'm sorry but isn't git used in a really lot of projects? Does Apple really believe that someone would start committing his project with images (binary) data and stuff to Subversion or CVS?
Tho i love working in the shell, when i code in an IDE, i want to work with the the VCS of my choice from right within, especially if the IDE is supposed to as "innovative" as Apple always tells us.
Conclusion
After having almost worked two straight weeks in Xcode, i find it daunting to use. Apple's intentions might be good on Xcode (unlike the iPhone and iPad), but it's done in a terrible way.
Also, not having an open plugin support is really nasty since Apple always talks about products that fit the customer, not the other way around.
Anyhow, i will dig deeper into mobile development and may even put more efforts into that area. After i've done some work with Android i'll be sure what phone to get.
I am really looking forward tackel the problems of mobile devices in combination with live-data gotten from Akka-powered Liftweb-Application! This is going to be so interesting!
Best regards!
Monday, February 1, 2010
I've got a lot to do these days
Sorry if i haven't done any recent posts. This is because i have a lot to do.
One of my companies lost a contract last year due to that Quelle (a big german warehouse and online delivery service) went bankrupt last year.
I managed to get out of the rough stuff by buying everything they had stored in my warehouse for a pretty good price and selling it in my own eBay-Store at http://www.ihr-lager.com/eBay-Store.
Since that, i have to take care of a lot of contracts that need to be cancelled until mid-2010. So this is pretty time consuming since most of the contracts are long-term and it requires a lot of negotiating. So i am really sorry if i haven't been doing that much updates in the past two Weeks.
So let me write a little about the software.
The Warehouse-Software
was completely written by me in RubyOnRails (within 4 months of development-time) and docks to several applications, mostly hacked import/export like DHL EasyLog, Auktionmaster.de and Lexware (for Accounting).
Altho most of these functions are hacked, they work perfectly and stable for the past 1.5 years.
The purpose of the software is:
- receive orders and billing-status from a platform called Auktionmaster.de
- generate a pick-list (for my employees) and bills (for shipping to the customers)
- mark packages as sent and deliver that feedback to Auktionmaster.de
- export customer payments to lexware
Auktionmaster is something like Afterbuy. I won't comment on how that Company takes care about security, usability and good practices.. They once threatened me with a lawsuit since i was performing a little pen-test on their system.
Funny thing tho, they claimed to have a security-team who notices such activity. Sadly they replied with that after i had given them my results 2 days later..
Back to my application, it generates picking-lists for the people working in the warehouse so they know which warespace to go and pick how-many for which customer. Of course there is also bill-printing on A3-paper (even multipage). It prints over CUPS and is optimized for a HP LaserJet 5200tn.
I implemented detailed article-movement-logs which show which article went into which package and who moved article X to place Y inside my warehouse.
In October of 2008, 1 year after i started this company and 1 year 4 months after i started coding, i had a codebase which didn't even produce one single error since.
Which means Bug-free since 2010-08 ;) Sorry, but i gotta brag about this!
There is also a lot of export-features like exporting as Excel or CSV, so you can generate reports on the fly. Sadly this isn't yet optimized to fork into some kind of background processing, but that's just a piece of cake.
If anyone has need for a consultant in that area, i am more than happy to wrap my head around your ideas and give you the best of it.
One of my companies lost a contract last year due to that Quelle (a big german warehouse and online delivery service) went bankrupt last year.
I managed to get out of the rough stuff by buying everything they had stored in my warehouse for a pretty good price and selling it in my own eBay-Store at http://www.ihr-lager.com/eBay-Store.
Since that, i have to take care of a lot of contracts that need to be cancelled until mid-2010. So this is pretty time consuming since most of the contracts are long-term and it requires a lot of negotiating. So i am really sorry if i haven't been doing that much updates in the past two Weeks.
So let me write a little about the software.
The Warehouse-Software
was completely written by me in RubyOnRails (within 4 months of development-time) and docks to several applications, mostly hacked import/export like DHL EasyLog, Auktionmaster.de and Lexware (for Accounting).
Altho most of these functions are hacked, they work perfectly and stable for the past 1.5 years.
The purpose of the software is:
- receive orders and billing-status from a platform called Auktionmaster.de
- generate a pick-list (for my employees) and bills (for shipping to the customers)
- mark packages as sent and deliver that feedback to Auktionmaster.de
- export customer payments to lexware
Auktionmaster is something like Afterbuy. I won't comment on how that Company takes care about security, usability and good practices.. They once threatened me with a lawsuit since i was performing a little pen-test on their system.
Funny thing tho, they claimed to have a security-team who notices such activity. Sadly they replied with that after i had given them my results 2 days later..
Back to my application, it generates picking-lists for the people working in the warehouse so they know which warespace to go and pick how-many for which customer. Of course there is also bill-printing on A3-paper (even multipage). It prints over CUPS and is optimized for a HP LaserJet 5200tn.
I implemented detailed article-movement-logs which show which article went into which package and who moved article X to place Y inside my warehouse.
In October of 2008, 1 year after i started this company and 1 year 4 months after i started coding, i had a codebase which didn't even produce one single error since.
Which means Bug-free since 2010-08 ;) Sorry, but i gotta brag about this!
There is also a lot of export-features like exporting as Excel or CSV, so you can generate reports on the fly. Sadly this isn't yet optimized to fork into some kind of background processing, but that's just a piece of cake.
If anyone has need for a consultant in that area, i am more than happy to wrap my head around your ideas and give you the best of it.
Thursday, January 21, 2010
IP-Traffic accounting with PostgreSQL-Triggers
So i got this DB-server which does nothing but work out NetFlow files with flow-tools.
Since i want that data to be as live as possible for my customers, i've decided to go with a 15-minute rotation interval. This leaves me with 96 rows per day per IP. Since i got a /20, we've got to multiply 96 rows with 4096 IP-Addresses.
So i get 393.216 rows per day. That leaves me with ~12 million rows per month.
"What's the issue?" you may ask. Well when you have a customer interface where you want to show live-traffic, selecting over (let's say mid-month) 6 million rows, summing input, output and total bytes takes quite a moment.
Sure, i could throw hardware after this problem, but why waste money when you can gain performance by updating your schema. I came up with the following PostgreSQL Trigger:
CREATE FUNCTION update_traffic_per_ip() RETURNS trigger AS $traffic_update$
DECLARE
ip INET;
input DOUBLE PRECISION;
output DOUBLE PRECISION;
total DOUBLE PRECISION;
month VARCHAR(2);
year SMALLINT;
BEGIN
ip := NEW.ip;
year := EXTRACT("YEAR" FROM NEW.time - Interval '15 minutes');
month := to_char(EXTRACT("MONTH" FROM NEW.time - Interval '15 minutes'), 'FM00');
EXECUTE 'SELECT input, output, total
FROM traffic_' || year || '_' || month || '_per_ip
WHERE ip = $1'
INTO input, output, total
USING ip;
IF input > 0 OR output > 0 THEN
input := input + NEW.input;
output := output + NEW.output;
total := input + output;
EXECUTE 'UPDATE traffic_' || year || '_' || month || '_per_ip SET input = $1, output = $2, total = $3, time = $4 WHERE ip = $5'
USING input, output, total, NEW.time, ip;
ELSE
EXECUTE 'INSERT INTO traffic_' || year || '_' || month || '_per_ip VALUES($1, $2, $3, $4, $5)'
USING ip, NEW.input, NEW.output, NEW.input + NEW.output, NEW.time;
END IF;
RETURN NEW;
END;
$traffic_update$ LANGUAGE plpgsql;
DECLARE
ip INET;
input DOUBLE PRECISION;
output DOUBLE PRECISION;
total DOUBLE PRECISION;
month VARCHAR(2);
year SMALLINT;
BEGIN
ip := NEW.ip;
year := EXTRACT("YEAR" FROM NEW.time - Interval '15 minutes');
month := to_char(EXTRACT("MONTH" FROM NEW.time - Interval '15 minutes'), 'FM00');
EXECUTE 'SELECT input, output, total
FROM traffic_' || year || '_' || month || '_per_ip
WHERE ip = $1'
INTO input, output, total
USING ip;
IF input > 0 OR output > 0 THEN
input := input + NEW.input;
output := output + NEW.output;
total := input + output;
EXECUTE 'UPDATE traffic_' || year || '_' || month || '_per_ip SET input = $1, output = $2, total = $3, time = $4 WHERE ip = $5'
USING input, output, total, NEW.time, ip;
ELSE
EXECUTE 'INSERT INTO traffic_' || year || '_' || month || '_per_ip VALUES($1, $2, $3, $4, $5)'
USING ip, NEW.input, NEW.output, NEW.input + NEW.output, NEW.time;
END IF;
RETURN NEW;
END;
$traffic_update$ LANGUAGE plpgsql;
What this does? It takes the rows that get inserted into the table we put this trigger on, and updates (or creates) rows in the table traffic_$YEAR_$MONTH_per_ip to match the latest state of the traffic.
After that you have both, 15-minute-intervals and a cumulated total over the current month for every IP, where as the cumulated stuff from traffic_$YEAR_$MONTH_per_ip is a LOT faster than sum() input, output and total.
Why not a simple update-query in my code where i insert? Well in my humble opinion it's the DBs job to do such things. Since the data already gets pushed into the server, why not let the DB handle the update/create-queries? This is just good DB-design.
Surely i will NOT save you a few weeks of work and paste my rotate.pl which handles everything. But hey, where's the fun in *not* learning new stuff? ;)
Best regards
Friday, January 15, 2010
ActiveMQ 5.3.0 ebuild for Gentoo
On 27th of December last year i created a Gentoo ebuild (build instruction file) for Apache ActiveMQ. Altho i don't use it actively, i needed it for my personal Gitorious setup.
Since i don't like having daemons lying around without any relation to a packaging-system, i create the ebuild and submitted it to Gentoo's Bugzilla.
It basically extracts the files, creates a dedicated user and has an init- and conf.d-file.
You can find all files at http://bugs.gentoo.org/show_bug.cgi?id=298457.
Have fun!
Since i don't like having daemons lying around without any relation to a packaging-system, i create the ebuild and submitted it to Gentoo's Bugzilla.
It basically extracts the files, creates a dedicated user and has an init- and conf.d-file.
You can find all files at http://bugs.gentoo.org/show_bug.cgi?id=298457.
Have fun!
Wednesday, January 13, 2010
The Big Bang Theory s03e12 "The Maternal Congruence" Review
This is a very funny episode where Sheldon plays Raj's wingman and Leonard gets into a fight with Penny over her believes in Psychics.
Sheldon and Raj both "score" at an Event in the University and have a Rockband session with the girls at home.
Ultimately the episode finishes where Sheldon goes to bed alone, when his date knocks at his bedroom door asking if she could stay in here since Raj and her friend are making out in the living room. Sheldon then invites her in and tells her that he'll sleep in Leonard's room, leaving his room carrying the green light which was given to him by Raj as trade for going out as his wingman.
It's really a funny episode. I love it ;)
Sheldon and Raj both "score" at an Event in the University and have a Rockband session with the girls at home.
Ultimately the episode finishes where Sheldon goes to bed alone, when his date knocks at his bedroom door asking if she could stay in here since Raj and her friend are making out in the living room. Sheldon then invites her in and tells her that he'll sleep in Leonard's room, leaving his room carrying the green light which was given to him by Raj as trade for going out as his wingman.
It's really a funny episode. I love it ;)
Sunday, January 10, 2010
Packaging and deploying an akka-application with maven
I've been working a lot with akka (Scala Remote Actors) lately and i needed a way to package my project efficiently so i could quickly remotely deploy it on my akka host.
How to deploy an akka application
First off, although this is documented in the akka documentation, this information is placed very poorly under the REST category.
In your AKKA_HOME you have a deploy/ subfolder in which you can put all needed libraries one-by-one, also the .jar-files for your service you've implemented. But since we're human (and therefore lazy), i wanted an easier way.
How to package an akka application
So i dug up the jar-with-depenencies assembly-descriptor of Maven's assembly plugin. This is helpful since it packs all dependencies from your pom.xml into the final .jar-file by running
Sadly this will also pack akka into your jar which is already fully remotely deployed. Since akka's .jar-file is around 24MB in size, your .jar-file will be just as big (not counting additional libraries you actually need).
So i've prepared an assembly descriptor which will exclude specific dependencies. To use it, you need to add the following lines into your pom.xml:
<project>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
</configuration>
</plugin>
</plugins>
</build>
</project>
The assembly.xml can be found here. Feel free to adapt it to your needs.
I hope i didn't forget something. Tell me if i did ;)
How to deploy an akka application
First off, although this is documented in the akka documentation, this information is placed very poorly under the REST category.
In your AKKA_HOME you have a deploy/ subfolder in which you can put all needed libraries one-by-one, also the .jar-files for your service you've implemented. But since we're human (and therefore lazy), i wanted an easier way.
How to package an akka application
So i dug up the jar-with-depenencies assembly-descriptor of Maven's assembly plugin. This is helpful since it packs all dependencies from your pom.xml into the final .jar-file by running
mvn assembly:assemblySadly this will also pack akka into your jar which is already fully remotely deployed. Since akka's .jar-file is around 24MB in size, your .jar-file will be just as big (not counting additional libraries you actually need).
So i've prepared an assembly descriptor which will exclude specific dependencies. To use it, you need to add the following lines into your pom.xml:
<project>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
</configuration>
</plugin>
</plugins>
</build>
</project>
The assembly.xml can be found here. Feel free to adapt it to your needs.
I hope i didn't forget something. Tell me if i did ;)
Subscribe to:
Posts (Atom)
