Barcamp JB - December 6 and 7
December 6th and 7th

Archive for the 'Uncategorized' Category

GNU Screen Tip! Multiple configuration files

October 8th, 2006 by aizatto

Not many people have heard of GNU Screen. (Wikipedia) And to those who have heard it, not many actually use it. For people not familiar with screen think of it now as tabs for terminals. But it’s more powerful than that, so perhaps think of it as lsd-induced-super-intense-spectacular-tabs.

I’m a heavy user of screen actually, and use it in combination with vim, as it provides me with speed.

But there is a shortcoming of screen which, either I couldn’t figure out, or difficult to google. So what I did instead was created a script to help me out.

The scenario is that I have several projects, say a Drupal, and a Ruby on Rails project.

With screen you can start off with multiple tabs open and settings optimized for your needs. Well I had different needs, different needs for each project.

Screen saves its configuration files in a screenrc configuration file, and the user default configuration of screenrc is saved in ~/.screenrc. I wanted a individual screenrc for each of my project. I initially thought screen was able to load both the default and unique screenrc, so I ran:

[code]
$ screen -c ~/screenrc/drupal
[/code]

Didn’t work, as it didn’t load my default screenrc settings. I continued trying.

[code]
$ screen -c ~/.screenrc -c ~/screenrc/drupal
[/code]

Another failure.

Next was google, but that wasn’t too helpful as well. Great choice to call it “screen”, such a generic name/word makes it difficult to search for.

What next then? Yes I could if I wanted to hacked the GNU Screen source, and solve the problem. But I’m not a C guru, not exactly my area of expertise, plus I wanted to do it quickly.

So what I did was make a Ruby script which parses my default screenrc file, and my project’s screenrc file. This would include the default file contents into the screenrc file automagically.

You can download the script here. Don’t forget to make it executable.

The script works by entering:

[code]
$ ~/path-to-script/generate_screenrc.rb project
[/code]

Where project is the file containing project specific screenrc settings.

So what now? Well now have I have a folder called “screenrc” in home directory and I fire up screen with:

[code]
$ screen -c ~/screenrc/project
[/code]

Where project is the project I want to load.

You don’t have to use this for coding, perhaps you might want to have a screen instance with monitoring programs running.

In my case I would then have a file called ~/screenrc/monitor and maybe include this configuration:

[code]
screen -t top 0
screen -t iptraf 1
screen -t irssi 2 irssi
screen -t nload 3 nload
[/code]

Customize it however you want.

Another Tip

For VIM users, include this vim modeline, in your default screenrc settings, and your produced screenrc file will have screen’s syntax enabled.

[code]
# vim: syntax=screen
[/code]

For more GNU Screen tips have a look at their manual, or the Gentoo Wiki. I particularly like the visualization of the “tabs”.

Instead of going through all this I could probably use an actual IDE…

Why I Hate Systems Analysis and Design Classes

October 5th, 2006 by aizatto

The topic of Systems Analysis and Design is important in the development of software systems. I agree its important in the development of good quality Software, in the sense of propper planning, analysis and design.

But when it comes to my universitiy/college classes on teaching it, it is just so boring. The importance of the subject is not felt at all.

When it comes to developing, or describing a system for class, I despise it, and I believe I speak for alot of other people as well.

Somethings I despise about SADN class:

  • I despise drawing Context Diagrams
  • I despise drawing Data Flow Diagrams

Oh but I do find drawing Entity Relation Diagrams easy and fun.

When the lecturer gives us the assignment to design a system, its typically a few page descriptions about the fallacious organization and the system they want, or are using. We are typically suppose either draw out their current system, or design them a new one.

The main reason I despise SADN is because in the development of a system, there are a large number of variables that the assignment typically doesn’t cover. Generally we are to make assumptions for the development of the system.

For example; When conduting what is dubbed as “requirements analysis”, obviously the cost of the system is very important to the customer. But for our assignments the total cost of ownership can be in a large huge and gargantuan amount, which in reality I believe people would disagree upon.

My take is that these assignments should have a stricter set of constraints by the “customer”, and should be more realistic, and believable.

In APIIT, SADN was taught in the first year. As I had prior experience with messing around with databases, and building my own “systems” it was easy for me to understand some of the aspects that were taught in the class. But when you come with no development background, and you try to understand importance, its a bit difficult. People don’t know what to exactly “deploy” as they were never taught the tools, all they know is to deploy a “database”, but which one is the suitable one. Perhaps SADN should actually be taught in the second year?

In Monash, SADN is actually taught in the second year. The first year its labelled as “IT In Organizations” (Monash Code: FIT1003), its basically the same thing under a different disguise, but we don’t build systems. We describe ones that have already been built, and build our pretty diagrams for those.

They leave too much up to the imagination to patch that for me, it feels like the assignment does not carry any weight at all as it is completely fallacious, fictious, and completely in accurage. Thus making it tedious, and especially boring.

Or maybe I just hate doing assignments.

MNCC 18th Annual General Meeting

June 23rd, 2006 by aizatto

Congratulations to MNCC on their 18th Annual General Meeting held last night on Thursday 22nd June 2006. The food good, the reception nice, the people great. Cheers to another year for MNCC.