"The noblest pleasure is the joy of understanding"   (Leonardo da Vinci)
Website banner

Archive for the ‘Technology’ Category

Ny router

Saturday, February 13th, 2010

Så fik jeg endelig taget mig sammen til at købe en ny wireless router. Valget faldt på en prisbillige N Home Router fra D-Link.

Den ser måske ikke ud af meget, men den har et væld af opsætningsmuligheder, og var forbløffende nem at få til at virke. De utallige routere jeg har haft i tidens løb har været enten meget svære at sætte op, eller har vist sig at være helt umulige at arbejde med. Senest en Huawei D100 der ikke har givet mig endet end grå hår!

Good article on the LINQ To SQL vs Entities

Sunday, January 17th, 2010

Good article highlighting the advantages of both LINQ To SQL and LINQ To Entities.

http://msdn.microsoft.com/en-us/library/cc161164.aspx

Static DataContext? No-no

Wednesday, January 6th, 2010

It is necessary to reuse the DataContext object in an ASP.NET application, but the way to do it is a bit tricky. Especially if you have a multi-layered data model and you make several queries against the database.

The obvious - but wrong way - is to create a static instance of the DataContext somewhere in your business model. The reason this is wrong is that the static variable will remain there for successive calls to your web application. If something goes wrong in one request, for instance if an entity is updated but for some reason the SubmitChanges fails, then this failed object will still be in the DataContext when subsequent (or concurrent) requests to your site occur.

This blog has a nice approach to how the DataContext can be tied to the HttpContext.

http://www.west-wind.com/weblog/posts/246222.aspx

In particular the comment by Richard Deeming using an extension method looks promising.

Reposting… How to upgrade your 1.5 developer Android phone to 1.6

Wednesday, December 23rd, 2009

For those of you who, like me, have been visiting this site

http://developer.htc.com/adp.html

just to find out that the links to the official 1.6 firmware have “gone fishing”, here is a mirror that actually works.

Instructions for how to install the image can be found on the HTC website above.

Want to root your dev phone, but don’t know which custom ROM to download? Let me recommend CyanoGen. Read more here:

http://www.cyanogenmod.com/about

Happy modding!!

HDR tonemapped image using Photomatix

Tuesday, August 18th, 2009

Photomatix er nemt at bruge, men jeg er ikke tilfreds med resultatet. Synes faktisk dens indstillinger var svaere at forstaa. Men det er en interessant ide. Det virker dog nok bedst paa billeder med een lyskilde.

Denne gang er der kun een lyskilde, skrivebordslampen. Det giver et mere naturligt udseende, men der mangler lidt kontrast synes jeg.

Pinhole camera

Sunday, June 7th, 2009

Ever thought of making a pinhole camera? If you have a digital SLR camera, it is really easy, and you can see the result instantly.

I took the lens off of my D3, and taped a piece of aluminium foil in front of the opening. Then, very carefully, I punched a hole approximately in the center with a thin needle.

This is what the camera looked like:

This is the result (click for a larger version):

Not too bad I think. The photo was taken with a 2 seconds exposure using 3200 ISO.

D3x

Friday, April 10th, 2009

Forgot to say.. in Akihabara I had the chance to try out a Nikon D700 and a D3x. The latter is very similar to the camera I have, but has twice the resolution (24 megapixels).

I have uploaded one test photo to my Flickr site:

http://www.flickr.com/photos/thorasmund/3428248135/

Slut med at bruge min nye mobiltelefon :(

Friday, January 9th, 2009

Som nogle husker, koebte jeg for 3 uger siden en ny mobiltelefon, en HTC Dream G1, den foerste mobiltelefon der er baseret paa det aabne Android operativsystem. Jeg checkede specsne noeje for at vaere sikker paa at den kunne bruges her i Japan, og derefter bestilte jeg saa et eksemplar direkte fra det firma som Google og de andre i Android-samarbejdet har valgt at anvende til at saelge de specielle “developer phones”. Developer phones er mobiltelefoner hvor hardwaren ikke er laast til en bestemt version af operativsystemet, og hvor man kan benytte SIM-kort fra en hvilken som helst udbyder.

Da jeg havde faaet mobiltelefonen, satte jeg spaendt mit nuvaerende SIM-kort fra SoftBank i, og, YES!, det virkede bare med det samme! Telefoni, 3G, alt virkede!

Jeg naaede saa at bruge den i 3 uger, saa skete det jeg havde frygtet. Et eller andet uigennemskueligt system i SoftBanks officielle mobiletelefon-modeller registrerer hvordan man forbinder sig til nettet. Hvis ikke man det specielle software koerende paa sin telefon, kan SoftBank se det ikke er en af de modeller de officielt saelger. Det har noget at goere med at man kun kan forbinde til visse netvaerk (en laengere historie de ikke kunne forklare saa jeg forstod det).

Resultatet var at jeg, paa trods af at jeg havde en flat-rate aftale mht. brug af 3G internet, i loebet af 3 uger fik oparbejdet et forbrug af packets der svarer til 3500 kr! Jeg fik en automatisk SMS fra SoftBank da jeg naaede op over 2500 kr, og jeg kontaktede dem derfor straks.

Takako snakkede med dem og vi fik saa forklaringen ovenfor, hvortil Takako sagde at det kan godt vaere at vi har gjort noget forkert, men det skulle de have haft informeret os om tidligere. Og, vi vil under ingen omstaendigheder betale det beloeb. De tilboed saa at vi kunne betale halvdelen, hvilket Takako heller ikke accepterede, og saa gik de til sidst med til at vi ikke skulle betale noget som helst!

Fremragende indsats af Takako!! Men elendig service fra SoftBank. Det er altsaa 100% umuligt at have sin egen mobiltelefon med og bruge den i Japan selvom den ellers er fuldt kompatibelt med de netvaerk SoftBank har her. Hvor er det elendigt. Og hvor er jeg bare ekstremt traet af den her politik. Saa saet dog for helvede priserne lidt op og saa tillad folk at bruge det handset de vil!

HTC G1 Dream “Android” phone

Monday, December 22nd, 2008

I finally got my new HTC G1 cellphone, the first mobile phone to come with the Android operating system. Here are my impressions so far:

POSITIVES

  • GPS combined with information from 3G antennas (to help locate the satellites) works absolutely flawless. I can usually get a GPS fix within 10-20 seconds.
  • The built-in rotation sensor also works really well. I have already programmed a simple compass application.
  • The web browser (based on WebKit) works really, really well, and can easily compete with the browser on iPhone. Android still lacks the smart finger movements to control zoom, back and forth etc. but some developers have figured out to do it themselves.
  • The whole OS is extremely well made. It is very easy to navigate, things just work as they are supposed to, and it is really fast. Flipping out the keyboard changes the screen orientation and it just happens like that, very short delay, and no redrawing artefacts (like my Windows Mobile phone).
  • The Android Market, where you can download applications, works really great too. Many apps are still in development or not very well made, but a user-driven rating system makes them sink towards the bottom. Shazam and ShopSavvy are my favorite apps at the moment!
  • The design: Many bloggers have commented on the old-fashioned outdated design, but I actually find it both beautiful and quite small. Easily fits in my pocket, easy to hold in the hand, and the sliding keyboard works well. Only minus is the USB cable connector. When a cable is plugged in the phone is awkward to hold, and typing on the keyboard is difficult. A separate plug for earphones would have been a plus too (I can’t charge and listen to music at the same time for instance)
  • The camera is actually ok for a 3mbit phone camera.
  • Debugging apps on the phone is a cakewalk! Plugin the phone with the USB cable, mark your Eclipse projectas “debug” and Eclipse now sends the output to the phone instead of the emulator! Could it be easier??

NEGATIVES

  • No support for non-English input
  • Battery life not as good as one could have hoped for (but not as bad as most people say). I was able to run it with 3G on all day, and with WLAN on the whole evening, and it is still running. GPS seems to be the real power consumer though.
  • Almost no widgets. No widget SDK yet. (widgets are small programs that run on the main screen of the phone)
  • SoftBank still charges me almost 10,000 yen for one month of flatrate 3G. I misread the small print… Damn.
  • DoCoMo does not allow me to use their sim cards in my G1 because of some software that needs to be installed for me to use their 3G network (called FOMA) with flatrate. You can make regular phone calls though (tried it today at the DoCoMo store)

Ok, the phone is still a 1. generation product. Many things that are considered almost mandatory on cellphones these days are missing. Video camera? Calendar on the main screen? Answering machine? Etc etc. But the good news is that the SDK, even the whole OS, is open! Free for everyone to download. So, it is up to us, the community, to develop all these missing apps!

Update:

Today I charged the phone all night, then in the morning around 8:00 I unplugged the charger. I had it with me all day, and had the wireless connected for about 3 hours. Now, at 21:30 it is at about 40%. Not bad really.

Photos

The ShopSavvy application scanned the barcode on one of my books, and immediately found it in its database!

The browser can easily handle javascript controlled data intensive applications like this webcam.

Two photos of my own GPS application running on the HTC G1 Dream

SongBird (I am still looking for an iTunes replacement)

Wednesday, November 12th, 2008

SongBird, the Mozilla powered open source system for organising your music and putting it on your iPod, which has been developed to replace the dreaded iTunes, does NOT (and i repeat NOT) actually support syncing music to your iPod! At least not the latest generations of iPod, iPhone etc. Just a warning to those who thought that SongBird, which has been heralded as the best replacement for iTunes, could actually replace iTunes - it cannot. It is a beautiful product on its own, it just can’t do what it was meant to do…

Of course it is all due to Apple releasing produts with yet another undocumented protocol, so the developers of third party applications are left in the dark. In these days and ages I have stopped being suprised. I am not even disappointed, just… bleh.

[[[ Copyright (C) Thor Asmund 1998-2008 ]]]