Making “File Size View” in Konqueror suck less

March 5th, 2010 by exhuma.twn

I’ve been down that road many times: “What folder takes up the most disk space”. Over the time lots of junk accumulates on one’s disk. So far the following one-liner has been a trusty companion:

$ du -s * | sort -n

Some other tools are available of which I don’t remember the names. But why not use something that integrates well with Konqueror in KDE? Like “FSView” (short for file-size view)? Well, for one thing it’s painfully slow, and what makes things worse it’s utterly unreadble. But what I figured out this afternoon, is that the app actually offers some quite nice settings. The buty of Konqueror integration is that the “plugins” can insert thei own menu-items wherever they like. Which is nice, because they then integrate well with already existing menu options. But on the other hand, if you are used to open menu paths like “Plugins -> MyPlugin -> Settings” or “Edit/Tools -> Options -> Plugins” you won’t find them.

In the case of fs-view, the options are neatly tucked away in the “View” menu. Which actually makes perfect sense. But working too much on Windows-inspired user interfaces twisted my mind too much and I go looking into the non-obvious places out of pure habit 😉

Now, to spice up fsview a bit I made the following changes:

  • In the “Visualisation” sub-menu:
    • Set “Nesting” to “Vertical”
    • Set “Border” Width to 3
    • Disabled both options “Enable Rotation” and “Shading”
  • In the “Stop at Area” sub-menu:
    • Set value to “400”
  • In the “Stop at Depth” sub-menu:
    • Set value to “2”

Both “Stop at …” settings limit the number of times fs-view has to redraw/rearrange the grid. This should speed things up and it becomes more readable. The end result looks something like this:

FSView with customizations

FSView with customizations

In any case, running fs-view on folders with a large number of files can be very slow and make konqueror even unresponsive while it’s running. Be patient. In my opinion, if you want to determine the biggest file/folder as quickly as possible, the “du -s” method (as outlined above) is preferrable.

Posted in Linux | No Comments »

Dialog buttons not responding in Eclipse under KDE/GNOME

February 1st, 2010 by wickeddoc

In case you’re running into the same trouble as me, that dialog buttons are not “clickable” anymore under Eclipse, just add the following line to one of your linux startup scripts to fix the problem:

export GDK_NATIVE_WINDOWS=1

Posted in Coding Voodoo | No Comments »

Mayflower Zend Framework Cheatsheet

December 31st, 2009 by wickeddoc

Several weeks ago I was scouting the Internet for a Zend Framework cheatsheet and I found a blog entry somewhere about a Zend Framework Cheatsheet Poster, created by a German company called Mayflower.

On their blog they say, if you’re an eager Zend Framework developer and want to get your copy of their Cheatsheet poster, you’ll just have to send them an email and you’ll get this great Poster delivered to your office or home or whatever, free of charge. So that’s what I did and guess what, a week later I received this very useful poster in the mail.
So if you are a Zend Framework developer yourself and want to own this cool poster, don’t be shy, just send an email to Björn Schotte over at Mayflower.

Here’s a photo of the poster in our office @ Visual Online, Luxembourg

Mayflower Zend Framework Cheatsheet Poster

Posted in Zend Framework | No Comments »

Unable to easy_install psycopg2 on debian

October 29th, 2009 by exhuma.twn

Problem:

$ easy_install psycopg2
Searching for psycopg2                                                                                                                                                                                                                                                      
Reading http://pypi.python.org/simple/psycopg2/                                                                                                                                                                                                                              
Reading http://initd.org/projects/psycopg2                                                                                                                                                                                                                                  
Reading http://initd.org/pub/software/psycopg/                                                                                                                                                                                                                              
Best match: psycopg2 2.0.13                                                                                                                                                                                                                                                  
Downloading http://initd.org/pub/software/psycopg/psycopg2-2.0.13.tar.gz                                                                                                                                                                                                    
Processing psycopg2-2.0.13.tar.gz                                                                                                                                                                                                                                            
Running psycopg2-2.0.13/setup.py -q bdist_egg --dist-dir /tmp/easy_install-cHE0C_/psycopg2-2.0.13/egg-dist-tmp-x-CxRS                                                                                                                                                        
error: Setup script exited with error: No such file or directory

Solution:

This most likely indicates that you are missing the “libpq” headers:

sudo aptitude install libpq-dev

should solve the problem

Posted in Python | No Comments »

Zend Studio forgetting about your ZF Project

June 16th, 2009 by wickeddoc

as a php developer i’m using zend studio for eclipse on a daily basis. sometimes zend studio forgets about my zend framework projects, especially projects which are hosted on a SVN repository. i close my project, reopen it, and for no obvious reasons zend studio no longer recognizes it as a zend framework project. huch!?

until now i was unable to find a real solution to my problem, but here’s a little workaround which should get you up and running again, in case you’re running into the same problem.

close the project, then just open the .project file at the root of your project in your favourite text editor and check the ‘natures’ section, make sure it contains the following line:

<nature>org.zend.php.framework.ZendFrameworkNature</nature>

that should do the trick.

Posted in PHP, Zend Framework | 2 Comments »

Add creation and modification timestamps to an Excel worksheet

February 19th, 2009 by exhuma.twn

Please, for the love of $deity do not hit me….. This is going to be a post about excel!

Excel is a horrid solution for data entry, and even worse for data archival. And yet, it’s one of the most commonly used solutions. One of the most useful information in any given data-set is the information about when the information was created and when it was last modified. This is something that any decent developer in charge of a data collection (let’s just call it that for now) will add to each data record.

Alas, a lot of non-it people manage and store their data in excel worksheets. And that is OK with me as long as they pay attention to data archival. In it’s most simple form, data archival can be achieved by storing the data as a CSV file and including the following metadata:

  • Which column represents which value (the name of the variable)
  • The data type (number, text, date, …) of each column
  • If a column is “coded”, please also include the meaning of each code.
    For example a “Yes”, “No”, “Maybe” column might be stored as “1”, “2” and “3”. Which means in it’s most basic nature it’s a numeric variable, but the different values have a meaning attached to them. So: Add this list in your metadata description.
  • If any computations or checks are performed on the values, please add them to the metadata document as well!

Even if the timestamp values might seem superflous at first, it will be of great help to anyone tracing errors in the data. Imagine that you would at some point need to fix some values that were entered/modified during a specific time period for whatever reason. Without this most basic bit of information you will be up for a treat. However, if it’s been rigurously implemented since the beginning, you’ll have the problem solved in no time.

Now, each halfway serious database system will offer you this kind of functionality out-of-the-box. But Excel is no database system (I intentionally left out the word “management” as this issue is a bit more general!). So it does not offer you a straight-forward way to solve this. But even if it’s not straight-forward, it’s simple enough for about anyone using Excel do add this bit of information.

Assuming that you use the first two columns (numbered 1 and 2 in excel) of your worksheet to add creation- and modification timestamps simply open up the Visual Basic editor (found in Tools->Macro or somesuch), next, in your project tree (in the top left of the screen) select your workbook (the .xls file), and in it’s sub-tree double-click the Worksheet that should have the timestamps set automatically.

Then copy/paste the following text into the just opened code editor and you’re done. I hope the comments will give some insight as to what happens. Note that in this case I will ignore the first row of the sheet, and obviously, the first two columns. If that does not suit your needs, feel free to change this script to your liking.

'
' Callback which is called when a cell in a workbook changes
' @param Target: The cell that changed it's value
'
Private Sub Worksheet_Change(ByVal Target As Range)
   ' We will ignore any changes in the first row, as it contains header labels
   If Target.Row = 1 Then Exit Sub
   
   ' As we set the values of column 1 and 2 we won't need to capture changes in these either
   If Target.Column = 1 Or Target.Column = 2 Then Exit Sub
   
   ' We will update the timestamp in column 2 *always* (last changed time)
   Cells(Target.Row, 2) = Now
   
   ' We will update the timestamp in column 1 only if it is empty (creation time)
   If IsEmpty(Cells(Target.Row, 1)) Then
     Cells(Target.Row, 1) = Now
   End If
End Sub

Posted in Coding Voodoo | No Comments »

Best “How to run your internet company” video EVER!

October 24th, 2008 by wickeddoc

this week i’ve stumbled over the following video.

the video shows a presentation from Jason Fried from “37Signals” about how he runs his company.

as i’m working for a small internet service provider myself, i found this video very inspiring and a must-see for everybody in the business.

i think that there are a lot of very good points being made, like teleworking, focus on what matters, don’t waste your time on “david vs goliath” battles etc.

i recommend this video to everybody who owns or works for a small web-related company

Source: http://www.37signals.com/svn/posts/1329-my-talk-at-the-business-of-software-conference-september-2008

Posted in Babble, Techno Voodoo | 3 Comments »

Throwing standards out the window

September 24th, 2008 by exhuma.twn

This really seems to be a trend in software development. Especially on the Web. We have organisations like the W3C that continuously struggle to promote interoperability and standards.While developing I am trying to re-use as much of that knowledge as possible. Afterall, if someone already made the effort to solve a specific problem why should you rethink it again? And actively developing since the late ’90s I can safely say that I’ve seen my fair share of source code.

One thing I have realised is that in the past, developers seemed to care more about clean coding and standards.I have the impression that all this is seriously going down the drain since – let’s name it- the “Broadband Revolution”. Since then about everybody has an Internet connection at home and the number of wannabe web-developers skyrocketed. Now, if you google for JavaScript/HTML/whatever references you do not find one reference, you find hundreds. And about all of them seems to be written by somone who thinks to know better.

Why do these people re-invent the wheel by writing down on their web-space what’s already been written by domain-specialists? Are they trying to show the world just how “good” they really are? Are they looking for recognition on the web that they could not get in real life? Because, frankly, I would not have much respect for the work they do

Back to topic. About standards. Consider the following excerpt:

Note: The latest W3C method to connect an event handler to an event is to use the addEventListener method, similar to Java. However, this is not supported by Internet Explorer, and since Internet Explorer owns 96 percent of the browser market, we can ignore addEventListener.1

It’s statements like these that drive me up the wall. And it’s one of the first links I got back from google when looking into the ins and outs of event handling in modern browsers. I am all for education and educating new (web-)developers about how things should be done. And this simply is not the way! Stating that you should throw out all the standards, simply because the market leader does not support it is just wrong. With this train of thought, the standards will never be adopted properly. Now this is the special case of Web-Browsers and JavaScript support, but this example easily spans over other areas as well.

Having a text like this in the top google hits surely gives newcomers the wrong idea.

I am honestly curious to see how the web evolves in the next few decades. But maybe I’m just too pessimistic and it will all turn out well. Time will tell!

1:  http://bucarotechelp.com/design/jseasy/96001603.asp?x=52&y=9&page=2

Posted in Babble | No Comments »

Demographics of Open Source projects

September 4th, 2008 by exhuma.twn

One thing I have been asking myself quite often lately: “Why do – even popular – open source projects often have mediocre coding standards?”

My first thought was: Ok, most likely many of the projects were written by non IT-professionals who only code “out of their head” without thinking things through at first. Curious as I am, I googled for the very title of this post. And I fell across an article on Linux Today about a study done by the Boston Consulting Group (Also quoted on slashdot). What I found particularly disturbing was the finding that the most part of the interviewees considered themselves as IT-Professionals. Granted, only interviewing less than 600 developers from only one source (sourceforge), is barely representative, and most likely highly biased as well. But it’s an interesting survey nonetheless.

So, why – in the love of $deity – do so many projects written by allegedly IT-Professionals present themselves with very poor coding style and more often than not very poorly designed database schemata? It’s becoming an increasing nuisance to work with these projects. If you want/need to make changes/extensions to the existing code you often need quite a while to get to grips with the logic behind all that exists.

Interestingly though, the stricter the rules of the used programming language/database the better the code, but the less common it is as well in open source projects. This does not mean though that it’s the fault of the programming language. Not at all. Even with a language as flexible as Perl you still can write very sexy code. But I haven’t seen a single Perl script that fit’s that description (though I haven’t inspected many Perl scripts yet in detail).

I would really like to see a study on the demographics of open source software that focusses it’s goal on coding style/standards rather than on the age group / motivations of coders. And it should also pick a representative sample of developers instead of going the lazy route and only querying sourceforge. This would certainly be an interesting project to do 😉

Posted in Babble | No Comments »

Bogged down in spam

August 22nd, 2008 by exhuma.twn

I just realized that we’ve got plenty of spam comments in our moderation queue. I did my best to clean it up. I appologize if any comments were lost in the process.

At least now We’ve got a nice collection of links to sites where I can buy cheap viagra, find adult friends, and even buy some designer luis vuitton purses! Good stuff….. -__-

Posted in Uncategorized | No Comments »

« Previous Entries Next Entries »

Pages

Recent Posts

Categories

Links


Archives

Meta