Monday, May 17, 2010

std::getline

I'm implementing a version check at work involving reading from a file and comparing the contents with data from somewhere else. As such I've hade to brush up on some basic file I/O. I quickly stumbled upon the following:

//-error handling
std::ifstream l_file;
l_file.open( "afile" );
std::string l_str;
std::getline( l_file, l_str );
if( std::ios::end != l_file.tellg() )
{
std::cout << "Garbage trailing first line" << std::endl;
}


When running the above code snippet with a file just containing the line "aoeu", tellg() does not indicate that EOF was reached. This does not block me in any way but I am curious as to why this is. I would have expected the istream to be modified so that the next input operation is performed after the delimiter (\n) if there is one or to indicate EOF (here). I should probably check the EOF bit but I still think that tellg() should provide the same info (since it can).

Going to be working a bit more overtime now. Don't really know when I'll get to start on my RoboCup team or play around with Android or Symbian or anything fun. My head always feels like a brick when I come home from work. Sad really.

Saturday, February 21, 2009

Malaysia

Okay so I still suck at blogging. And apparently any new posts don't show up, weird.

Lots lots lots of stuff to do here. Just go in after a day at the beach. Can you believe that it rained (really rained) for most of the day. Super unlucky :-S

Anyways. It's 11pm and we're all getting ready for bed. We're taking a train to Malaysia tomorrow morning at 4:30am so I'm gonna try to get as much sleep as possible.

I had a couple of pictures I wanted to upload, but the universities proxy doesn't like my laptop so that'll have to happen after Malaysia. Lots more pictures then hopefully!

Off to bed, gonna see if I can avoid scaring anyone of Kristina's neighbors when I brush my teeth.

P.S.
Singapore Sling ain't that hot...
D.S.

Friday, February 20, 2009

Clean

That's the word to describe Singapore apparently, I'd have to agree.
First day is over. It's 1AM here so off to bed and then away to some beach tomorrow.

I have couple of posts waiting on my laptop that'll pop up someday soon, just not right now.

Sleep tight.

Thursday, February 19, 2009

The adventure begins

And the first thing that happens is that the lock on my bag has a mind of its own and changes the combination. Great start :) Had to force it open and now I'm waiting for my mom to arrive with one of theirs.

Just under 2,5 hours left. Go Go Go. Got everything I need. Bringing my EEE along for the ride. Planning on blogging on it when I'm waiting for transfers and the like. It's not the best machine at connecting to wi-fi but I can always post it when I arrive in Singapore or when I find an open network I can use.

Time to turn off all my alarms or my neighbours will kill me when I get back.
See ya on the other side.

Tuesday, February 17, 2009

I am teh suck

Yeah. That's it. I suck at blogging.

Look, this entry's no fun.

The only fun part is about me being a bit kind of sort of anxious about flying to Singapore.

That's funny coming from someone who more or less flew between Portugal and Sweden each year for almost six years.

So cross your fingers. If I land safely in Singapore I might post some interesting pictures from way over there. And I might write some interesting stuff about what I see/experience.

So cross your fingers aight?

P.S.
Goes for my flight home as well OK?
D.S.

Wednesday, October 8, 2008

To blog

I was asked to write more on this blog. So here I am. Currently watching some new anime shows. "Tales of the Abyss" was so-so as expected, I should probably finish the game rather than watch the show. Although it would probably be easier to just watch the show. Looking forward to "Gundam 00" season 2. And I'm watching "Wolf's Rain" also, which is proving to be really awesome. Oh and "Heroes". Let's not forget about "Heroes". Yes "Heroes". Need. More. "Heroes".

"Heroes".

Work is work. BIG deadline on Tuesday when our Customer (capital C) is visiting to demo the system. Lots of Chaos and Confusion. And frustration from management. I'm going to Stockholm on Friday so I'll probably (hopefully) miss the before-weekend-frustration-attacks that will surely befall my colleagues. Although many of our problems right now arise from a sub-project that isn't following specifications. Frustrations. Call that sub-project A, then it communicates directly with B (another project), B communicates with a component (part of my system) we can call... C. Which in turn communicates with my component (D). Which creates a slight problem for me. Since once all the bugs in A are ironed out (slowly I might add) then B's errors will surface and be corrected before C until the whole process reaches D. This could of course be solved with doing integration testing between BC and CD by themselves, but there hasn't been any time to set up that kind of environment. So the worst-case scenario is work on Sunday, Monday night and then stalling on Tuesday.

Oh well, party Saturday in any case :)

P.S.
"Heroes"
D.S.

Monday, June 2, 2008

Back from London

So I'm back from London. Had a good weekend, lots of shopping (for me atleast). We saw the musical "The Wicked" which was really awesome. A super show with a bit of comedy and drama and tragedy that I'd recommend to anyone. I bought the book it's based on also, found it at a used book-store as well as a collection of Ursula K. Le Guin's "Earthsea" books.

I managed to pick up a couple of Banksy reproductions on canvas which I'll put up on my wall some day. You could almost literally find them at each and every corner so he seems to be fairly popular over there. Anyway, off to unpack my things.