Odd Christer Brovig’s Blog

random thoughts on everything and nothing

Miktex/latex doesnt render text in pdfs properly

August 4th, 2008 · No Comments

Symptom: When producing pdfs with latex (miktex distro) it uses bitmap fonts, resulting in text that it is not possible to either select or search.
Solution: install the cm-super fonts with the miktex package manager (large package), or use the \usepackage{lmodern} command to use the lmodern fonts that are included with miktex.

This post at miktex support forum outlines the symptoms, cause and solution.

→ No CommentsTags: Uncategorized

Inspiration

February 10th, 2008 · No Comments

When things suck.. just remember you’re probably better of anyways.

Lesson to be learnt: whine less.

→ No CommentsTags: Uncategorized

Trouble with Torrents (uTorrent) on Windows Vista with McAfee

November 9th, 2007 · No Comments

My mother recently bought a shiny new dell with Windows Vista on it. I recently got my fingers on it, and it’s pretty darn alright. But I had one problem:
starting uTorrent was causing the system to slow down and also drop http traffic…

After consulting a friend we found out he had the same problem some months ago. The solution was simple: uninstall mcafee.

So I uninstalled mcafee, and now my linux iso download is blazing. :-)

Btw, you REALLY SHOULD install some other AV after uninstalling mcafee. I’ve been pleased with Avast which is free. Also I’ve heard good words about AVG, Avira and Nod32 (this is one of the best, but payware).

→ No CommentsTags: software · windows

New Media I’ve Enjoyed So Far This September

September 10th, 2007 · 1 Comment

Music

Zoë Keating

I discovered a German artist called Zoë Keating the other day while watching a photo series(the ‘audio slide’) on New York Times that was about China and the consequences of the rapid industrialization. Make sure to turn on the sound.

So far I’ve only listened to the music on her myspace page and downloaded a live album from eMusic. There’s also some videos up on youtube.

Oh, and it’s cello.

Talib Kweli

Good hip-hop without all the killing, bling and “hoes”. From the Wikipedia article:

Talib Kweli (born Talib Kweli Greene in Brooklyn, New York City on October 3, 1975) is an American MC from Brooklyn, New York. He is one of the best-known rappers in alternative hip hop, and is frequently critically acclaimed, despite not having seen significant commercial success. His name in Arabic means “student”, his last name in Swahili means “true”.

So far I’ve listened to his new album Ear Drum and a mix cd called Right About Now. Both good in their own respects. Although I’ve heard that his older material is better, so there is more to explore.

Blogs

I’m a regular reader of Stronglifts.com which is a blog about strength training. It features themes as technique (helped me improve my deadlifts) and nutrition (proponent of the anabolic diet - which I’m not on.. as of yet.).

Not to much, but some.

→ 1 CommentTags: Random · music

Lessons Learnt After Developing a Web Application - Coding

May 28th, 2007 · No Comments

Yesterday I talked about how the project was executed in both the design and implementation phase. Today I’m ranting a bit more in detail about how we coded the thing in PHP (v5).

Database Access

Our Approach

When coding started, we agreed on (or rather, I pushed the view) that we should use the DAO pattern for our database access needs. To work easily with the database, and also to have the possibility of prepared statement we used Creole, a PHP database API that’s very similar to Java’s.

Soon, we had our DAOs. Though, all was not good. Eager to get going we started coding using our new functionality and didn’t bother coding up the corresponding service layer for them. This was alright to begin with since the application only had some basic CRUD functionality. The problems (or future problems if you want..) became obvious when we started adding functionality that cut across the model objects. Code cutting across the DAO layer was made. And this in turn led to duplicated code.

At that point, I guesstimate that our application was ~70% done. So, to go back and change everything into using a Service Layer wasn’t an option with the deadline closing up and the code was delivered with those nice dependencies within the layer.

Alternative Approaches

Looking back, I see that the Active Record pattern probably could have been a good choice.

The View (and Controller)

This was probably the hardest part to get done right. And there’s no real consistency in the approach here.

Some places the code for handling form data and get requests were in the same file, and the page posted to itself. I guess this is fine for smaller scripts, but some of ours were starting to get big quick, and doesn’t look very maintainable.. In other places there was sort of a controller. They took POST data and redirected with a header(”Location: foo”) call. This is a much more maintainable approach, and very MVC.

I think the issue would have been better solved using perhaps the Front Controller pattern or a good MVC implementation. Both coupled with a template language such as Smarty.

Summing up

Creole was a good experience. We lacked a good approach from the data layer and up. Using a framework like CakePHP or symfoni would probably been the best thing to do.

I think I have learnt a thing or two now.

→ No CommentsTags: web development

Lessons Learnt After Developing a Web Application - Design and Implementation

May 28th, 2007 · No Comments

This spring I have been doing some work on a web application, part of a deliverable in one of my courses (INF5270).

We were a team of four writers/programmers/designers/whatever needed. The deadline was about an hour ago, and we delivered our system 3 hours before that for once. So, for personal reflection I thought I’d sum up my experiences. Especially in the light of having read through a better part of Getting Real by 37signals.

The theme of the course is, as stated in its title, Design of Interactive Web Sites. The curriculum is somewhat broad, but the main focus is on Information Architecture and Sociability. Our task was to build a social web site (and also write up some reports about it and reflect on the theory of the course).

We decided on a theme early on; books. We were going to build a social web site about books, or literature if you want it dandy. We started investigating other sites within the theme, and found some. Looked into them, and what they did and reflected about what we would want to put in.

At this step, we only had some thoughts, and also a report that we had to deliver about our findings and how they related to the theory taught. The next step was, as Getting Real suggests, making the screens in HTML. Only, we skipped the part with sketches and drawings and drew directly on a document with ideas. I think this is probably one of the first (major) faults we made in the project.

Words in a document are fine, but do they really convey what we want? Everybody has different ideas, and that really shone trough nearing the deadline. We were not on the same note and the end result was different than, I think, everyone envisioned. If we had sketched the site early on and put it somewhere on the web it would have been much easier to see what we agreed and disagreed on and reach agreements.

So, we had the screens out there in HTML (part of another delivery), we disagreed, agreed and none of them really got updated. The same screens were the basis when we started on the 4th delivery that included the first bit of implementation. The screens where as much worth as the dead document, nothing. So we started coding, all in our own directions, which resulted in confusion and a delivery that consisted of different ideas, not ONE idea.

And, that was pretty much the story for our 5th and last delivery that was finished up some hours ago. We ended up delivering a system that deviated some, or much, from both our personal and common vision.

I think the following would have made the project execution better:
* Interface sketches EARLY on, perhaps just after deciding on our theme for the site, and then meeting up for more iterations and doing an early assessment of feasibility for the different parts of the site. Together with a vision document, and some documentation of elements in the sketch this would serve as the framework for the whole System.
* A live document where we documented our choices, so that they could be found in easily when needed (some code at night, others early in the morning).
* Some more meetings . Although Getting Real really disapproves of them I think they would work in our case (small team) to easily and quickly solve confusion on certain aspects in a quicker way than e-mail and/or IM.
* A centralized, online, meeting place. Campfire could probably have been suitable for this.

Hm, that’s what was on top of my head for now.

→ No CommentsTags: development · project organization · software · web design

Last Weeks Picks

May 17th, 2007 · No Comments

There was a pillow fight in Toronto last week, and the picture of this pillow fighter caught my eye. Maybe I will give up my disdain for people with dreads someday too? For some reason I’ve always felt a bit of contempt for people who doesn’t wash their hair on a regular basis, although some of the women can look really good with it. A shame.

As a person somewhat interested in possibly doing something by myself work-wise some day, I ran into the Personal MBA Manifesto site that more or less gives a list of books and magazines to read and study by oneself to attain knowledge similar to an MBA.
The manifesto states that you wont attain all the knowledge needed by the books alone, you need to be out there working with your own start up or something similar. I’m kind of a skeptical, but I enjoy reading —so I’ll definitely pick up some of the books for summer or something like that (already posess Getting Things Done by Allen for a year or so. How is that for Getting Things Done?;) —I’ll get right to it after exams.)

Last week was also the birthday of the typeface Helvetica. I found Magasinets article(norwegian) a enjoyable read. BBC also has good coverage.

→ No CommentsTags: Uncategorized · picks of the week

Installing GMF on Eclipse 3.3 (M7) Europa

May 17th, 2007 · 2 Comments

I ran into a problem today trying to install GMF on Eclipse 3.3M7 Europa. Some file within the GMF package could not be found and the updater just threw an error. The solution was easy (after trying so many mirrors..), use GMF’s own update site (of course..). The URL to the update site is: http://download.eclipse.org/modeling/gmf/update-site/releases/site.xml for the Europa specific builds.

Add the site to the update manager, check of to search both the Europa discovery site and the GMF Update Site, select GMF from the GMF Update Site and then press Select Required and you should be golden.

Info from the GMF Update Site page.

→ 2 CommentsTags: eclipse · gmf · reminder

SumatraPDF - a small gem

May 14th, 2007 · 3 Comments

Thought I just would share a link to a small gem (literaly):
SumatraPDF. It’s a blazing fast PDF viewer without any bells and whistles, just pure PDFviewing goodness. It can’t select text, but I seldom do that anyways.

Give it a try :-)

→ 3 CommentsTags: gem · reminder · software

Essential Software for a Fresh Windows XP Install

May 6th, 2007 · 4 Comments

As a personal reminder, and possibly helpful for other people, I’d thought I’d post what software I spend hours installing after hours of installing Windows XP.

Security

Development

Surfing/Net

Only one(I use GMail, Reader and Calendar from Google for other net stuff.)

General purpose

Multimedia

More suggestions?

→ 4 CommentsTags: reminder · software · windows