Browsing the archives for the open source tag.

Problems with Gamingstats

Applications, Coding, Projects, Web developing

I just fixed problem on Gamingstats that affected all of the users. This time invalid username was filtered to empty string, causing updating process to halt. Problematic user is now removed from the system, but the bug is still there. I try to fix it tomorrow or something.

I am not sure if I continue to support this project. It has way too many problems. First is that changes to Steamcommunity usually breaks up my system and I have to find out the changes and it takes lot of time. (this time the problem was my fault, but yeah). Another thing that kills my motivation is that I don’t use this site anymore myself. So it isn’t anymore so fun to work with it. It is more like a job that I don’t get money for.

Most likely I am going to close the application, release it under GPL license and move forward. There is only couple of users that uses the service and I think that the system is way too buggy. I had to rewrite the parser because my webhost didn’t had all the plugins and stuff that I used when I coded on local development server. Because of that, the updater doesn’t have the best stability with bad input…

I was going to sleep one hour ago, but because the system didn’t work as I expected I wasted one hour trying to fix it. And my website also went down once when I tried to fix it, so I am not very happy with this project currently.

So yeah back to sleep now… ->

No Comments

Battle For Wesnoth for iPod touch

Games, Review, iPod touch/iPhone apps

Battle for Wesnoth is open source strategy game for windows/Mac/Linux. Now somebody have ported the whole game to iPhone/iPod touch.

All the maps, units and rules are the same. If you have played the battle for wesnoth on your computer, you will learn iPhone version without any problems.

Major changes to pc version is only the controls (obviously) and framerate. Controls are good and hitting small buttons is pretty accurate. I haven’t got any major problems controlling the game. At first it may feel bit difficult.

As the iPhone isn’t as fast as the computer, it feels bit slow some times in terms of framerate. On large maps the scrolling can be pain because of this. (but the “next unit” action helps here) The load times are long for iPhone game. It takes about 1-2 minutes to get to the game… So its not for quick game.

There is also multiplayer game included, but I haven’t looked into it yet. The game also supports Openfeint platform. Openfeint is same kind of gaming community like Plus+, but it offers much better way to communicate with friends/other people. Openfeint has also achievements juts like Plus+.

The prize (4e) is bit high for a port from a free game, but if you like Battle for Wesnoth on computer, buy it. If you haven’t, check the pc version first, as it is free.

No Comments

Napalm Engine Framework Concept

Coding, Projects, Web developing

I have recently started new php project. It is my own php engine/framework.

I have tried couple frameworks and all of them have been pretty nice. I especially like cakephp.

But the problem with these sometimes is that they force too much where what code should be placed. Example the Model View Controller stuff. The idea is great idea and I have nothing againgst it, on some small project cakephp/any most of the frameworks are way too massive. (in my opinion of course)

But if I code from scratch and place all if my code where it feels good to place it… Usually something is somehow in wrong place. This is when I get the idea for my own framework.

Napalm engine framework (or NeF in short) is a php framework that doesn’t make creating code any faster. It just helps to keep code where it should be. It should help managing code base on small/medium project.

This framework also won’t force user to place some code on some place. It only offers way to manage code in standart way. If user doesn’t want to use all of the elements, rest of the system won’t break.

NeF will also be simple to learn, because there isn’t any kind of complex API.

The idea of application workflow is following:

Actions are things that gets users input, does querys to database, handle data, etc.

Render segment is in 2 parts:

  • View is a HTML document with php links to blocks
  • Blocks is a piece on a view. Example a content area/navigation.

Then there is 4 different helpers. Helpers are small code snippets that should be executed, but really aren’t part of actions/views

  • Pre-action helpers – stuff that is executed before actions
  • Pre-render helpers – before render
  • Post-render helpers – and after render
  • Normal helpers – can be used anywhere in code, called by specific function.

And if I will ever get this done, I will publish this under open source license.

No Comments

Firefox 3.5 performance

Applications, Mac, Web developing

Performance of firefox with older releases haven’t been awesome. Couple of addons can easily take over 100megs of ram and browser become easily very unstable and slow. I did update on my macbook (PowerPC G4, 1.6 GHz single core CPU, 1.5G DDR2 ram MaxOS 10.4.11)

New firefox has also new logo

New firefox has also new logo

Before update with 3.0 I had 7 addons installed. With 2-3 tabs open firefox used 250megs of ram and cpu was 30-40. When my firefox was on heavy usage, it taked over 1500megs of ram and 100% of cpu… After update to 3.5 memory usage dropped to 90-100megs. Cpu dropped to 10-15%.

Then I installed 26 addons and opened 47 tabs (2 youtube videos and one <video>-tag, lots of heavy js/css sites.) Memory usage was just 226megs and cpu usage was at 50%. Firefox was little slow, but usable! It didn’t even try to freeze. After the test I closed all tabs expect one and memory usage dropped to 148megs and cpu usage is back at 10-15%!

Quick list:

  • Using many (over 15) addons won’t kill firefox instantly
  • Opening many tabs(over 20) won’t freeze kill firefox anymore
  • Memory usage have dropped 300%-500%
  • CPU usage is almost always under 50% on normal usage its under 20%
  • Acid3 test gives 92/100 points (ie8 gets about 20)
  • Firefox is my primary browser again

Biggest problem for me with firefox was the CPU/MEM usage while using lots of addons and now its fixed. I can install every cool addon I want and still use firefox without killing it! Now I just want that they fix the nvidia/linux canvas tag bug…

3 Comments

Ohcount and Count Lines of code

Coding

Ohcount and Count Lines of Code (CLOC) counts size of code project. Mostly these aren’t very useful applications, but it is fun to see that I have written 300 lines of code in couple of days.

Ohcount is used Ohloh to generate source code reports. I was disappointed to found that i can’t use Ohcount to scan whole history of my repository, it only scans current status of code.

CLOC is written in Perl and Ohcount in Ruby. It maybe little annoying to compile Ohcount from source, but it is much faster than CLOC. If you want something that is easy to install, take CLOC. But if you are going to analysis more often than once, try Ohcount.

Here is example output from CLOC:


96 text files.
83 unique files.
33 files ignored.
http://cloc.sourceforge.net v 1.08 T=7.0 s (8.9 files/s, 547.4 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code scale 3rd gen. equiv
-------------------------------------------------------------------------------
PHP      49    588   172     1950 x 3.50    = 6825.00
SQL      1     58    87      277  x 2.29     = 634.33
BASH     10    54    133     261  x 3.81     = 994.41
CSS      1     46    5       192  x 1.00     = 192.00
Python   1     2     1       6    x 4.20       = 25.20
-------------------------------------------------------------------------------
SUM: 62 748 398 2686 x 3.23 = 8670.94
-------------------------------------------------------------------------------

And here is Ohcounts output from same file:

Examining 555 file(s)......

Ohloh Line Count Summary

Language Files Code Comment Comment % Blank Total
---------------- ----- --------- --------- --------- --------- ---------
php      58    2146 219     9.3%      716  3081
sql      1     277  87      23.9%     58   422
html     60    242  1       0.4%      38   281
css      1     192  5       2.5%      46   243
python   1     6    1       14.3%     2    9
---------------- ----- --------- --------- --------- --------- ---------
Total 121      2863 313     9.9%      860  4036

- Gestalts -------------------------------------------------------------------
Platforms: PHP, SQL, Scripting

Yep. There is some difference on results. I don’t know which one is more accurate.

I haven’t posted for a while because I have coded my main project. It isn’t public, but I will blog about it when it is ready. :) I try to blog more often.

No Comments
« Older Posts