Browsing the archives for the Coding category.

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

Rackspacecloud VS Amazon EC2

Applications, Coding, Internet, Linux, Review

I have written about Amazon EC2 some time ago. I liked the EC2, but now I found new competitor that is better than EC2. Rackspace cloud is easier to use and has great support.

Prizing
Both Amazon and Rackspace offers virtually unlimited computing power/file storage for low cost pay-as-you-go prizing.

It looks like Rackspace offers cheaper servers. Rackspace also has small 256m server for 0.015$ and that is my most used server, because I usually don’t need big server.

Managing servers
Here is the point where the real difference becomes. Amazon has some kind of weird command line tools for managing the servers, firefox addon and a onlineĀ  management console. The management console isn’t the best system, but it works. The main problem is that connecting to the server with ssh is damn difficult. It took 1hour for me first time to get the connection to the server…

Rackspace offers simple solution to connecting to the servers. They email the random server password for you. Then to can connect with normal ssh client to standart ports. No unnecessary key stuff etc. Rackspace also offers ajax console.

Support
I haven’t tried amazons support, because I haven’t a) needed help b) found where to get help

Rackspaces live support is awesome! There is always somebody to answer my questions.

In my opinion…

…Rackspacecloud is much better.

1 Comment

Stats

Applications, Coding, Games, Internet

I don’t know why, but I love also all kind of stats. It’s just fun to have dozens of data and then analyze it with graphs and pie charts. Here is list of services that gives stats from various sources. I use all of them regularly.

  • Google analytics – Nice stats of the website
  • WoopraAwesome realtime website stats tracking
  • Feedburner – Nice feed subscribers/reach tracking
  • Webalizer – Bandwith monitor provided by my webhost
  • Hlstatsx – Most of my games are source games, so the Hlstatsx generates nice stats. (Open source version)
  • Etqw stats site – The official stats site
  • My own script that generates graphs from official ET:QW tracker
  • Steamcommunity – Steamcommunity gives gametime stats and also very detailed stats for some games (tf2,l4d)
  • Tweetstats – Very clean and nice stats for twitter usage
  • Twitter grader – Another cool stats tool for twitter
  • Twittercounter – Get graphs from followers
  • Cloc/ohcount – Some stats from my programming
  • Ohloh – Stats for almost every open source project. Code analysis.
  • mon.itor.us – Just pinging my site and checking that it’s up and running
  • Pisg – Stats from IRC
  • Last fm – All of the music I listen is listed on last.fm Also see my history/progress graph generated from last.fm stats
  • Wakoopa – Wakoopa tracks what apps I use and how much.
No Comments

Ruby on Rails pastebin

Applications, Coding, Projects, Web developing

I have tried Ruby on Rails many times, but this time I managed to create something useful that works. I created a simple pastebin. Actually I didn’t write any code. I just executed couple of scripts and then removed unnecessary parts from ruby code and edited the views.

To host the pastebin I used Heroku. Heroku is very simple platform to host Ruby on Rails apps. It is also very easy to deploy a app to it. Heroku offers free hosting, but it also offers very big plans. Biggest hosting packages can be over 2000$. I recommend to try heroku.

My pastebin runs at pastebin.heroku.com

No Comments

Amazon EC2

Coding, Internet, Web developing

I have recently tried the Amazon EC2 service. If you don’t know what EC2 is, read this.

Prize of instance isn’t very high. If you need to run couple of heavy apps for couple of hours, it costs maybe couple of dollars. But for hosting website it is very expensive. So if you need powerful machine for quick tasks, try EC2. If you need hosting, try vps/shared hosting.

If you try EC2 I really recommend to try Elasticfox Firefox addon, because it makes managing of EC2 much easier. I also recommend to read the documentations well before booting instances. Connecting to EC2 instance via ssh is done with private-keys. This was first time I used private keys with ssh, so I first forgot to include the key when I booted my first instance.

I got my second instance running without problems and I got ssh access to root shell. After some modifications to source.list file I was able to install irssi and htop. It seems like there isn’t any limitations on ports etc.

htop running on ec2

htop running on ec2

What I will try next on EC2 is game server. As these are very powerful servers, it would be great to just boot instance with game server pre-installed and then stop it when it isn’t needed anymore. Also, a large EC2 instance would be nice render node for 3d rendering.

I may move static files of this blog to S3, but I am not sure if that speeds up my blog…

Edit: I found official management console of AWS and it looks pretty nice. Try it before Ellasticfox.

No Comments
« Older Posts