Hjertnes.blog

The art of SQL

September 05, 2017

The way we have built applications (I’m using the term applications here for everything from web sites, to backends, apps etc) that had more complex requirements than some file based storage is databases, and most of them used to be based on the simple idea of tables and relations between them. You can look at it as a spreadsheet that can reference between sheets and have strong requirements to what kind of data is allowed, both per row and per table. Most databases use some variant of the SQL language.

Today many use a different data model than SQL databases like for example the document based model of MongoDB. There are many good reasons to go for either. The good thing about something like mongoldb is that you don’t need to think that much about how to design the database to make it scale well enough. And it is much easier to get it to work in a distributed model.

While to good thing about SQL databases is that many of us know them really well. We know how to design them to be fast, flexible and scale really well. Not to mention how to tune the database servers behind them. And we also have really good systems for abstracting away some of the more complex parts of it; like Django’s ORM or .NET’s Entity Framework.

There is an art to designing good databases, that perform well and solve the problems you want to solve. You can ask for just the data you want, and do a lot of the heavy lifting on the database server instead of on your webserver or in your application. By using stored procedures (small programs that live in the database) or using views to simplify complex queries(a view is a way to make a “table” out of a complex query)

I love SQL and have spent a lot of time over the last fifteen years or so to learn it really well. And I don’t think SQL will go anywhere. But using SQL is in many ways a tool where it isn’t any better than the developer behind it is. Kind of like C. It is a absolute nightmare if the developer don’t know what they are doing, and it is amazing if the developer is.

What I hope is that those who don’t care move over to SQL, and those who do take their time and learn how to master this amazing piece of technology.

Cloud backup in 2017

August 29, 2017

I’m a little bit more interesting in backup than the average person because I did lose a lot of data, including all the pictures I took before 2006 or something. And I am a strong believer in having a cloud copy of all your important data. It doesn’t have to be a “backup”, but I recommend it, but Dropbox could be good enough for many people.

It was three obvious options when I came up with my previous online backup strategy:

- Use Dropbox if you just want a online copy of your data

-   Use Backblaze if you want a “set it and forget it” type solution.

-   Use Crashplan if you have more complicated requirements; like backing up external drives or network storage.

My storage requirements used to fairly simple, but after close to five years of using a DSLR, my raw files take up far more storage than I want to pay for on a MacBook Pro.

The way I have been doing it up this point is to use Backblaze for everything on my SSD, and upload a copy of “archival stuff” to Dropbox. But I started to investigate other solutions this summer, because it had become way too cumbersome. And I wanted to have a single solution for everything.

Backblaze is a great app, and I think it is the best option for most people. But it is a little bit too hard to make it do exactly what you want, if you are a little bit picky.

So, I decided to look at Mac OS software that backs up to Amazon Glacier. Glacier is either a service or a storage class for S3 (another service) where it is very cheap to upload and store data, but more expensive (and slower) to receive data. In other words, it is cheaper than S3, if you only upload data and don’t access it that often. Which is exactly what I need for a backup solution.

I tired Freeze and then Arq; but ended up sticking with Arq because it was much more mature and rock solid. After using Arq on my MacBook to backup both the internal storage and an external archive drive, I have no big complaints about it. It was all the features you would expect from a premium backup application. But I do miss a pause function that isn’t based on time; some times I just want to pause it until I resume. And the drive scanning is a little bit slow.

Book review

August 25, 2017

Jeffery Saddoris of the co-host of the On Taking Pictures podcast, the podcast that inspired me to move from being someone who enjoyed to take snapshots to becoming someone who has photography as a serious hobby, recently self published [Photography by The Letter](<a href="https://photographybytheletter.com/">Home &#8211; Photography by the Letter</a>) the most enjoyable photography book I have ever read. And I have read an embarrassing amount of photography books over the last four and half years.

This is the book I wish was there when I first got my Canon 650D.

It is a beautiful, straight to the point, concise and informative book.

My impression after reading through it during the train ride back home from work yesterday and the rest on my way to work this morning is that this book has everything you need to know until you want to take a deep dive into a certain area.

The problem I have had, and still have to this day with most photography books is that they are written in a overindulgent manner with a serious case of “word diarrhea”. Isn’t more information better? In general yes, but the devil is in the details. You don’t want too much details that can confuse you in a general overview. More details is good when you know the basic, know how to use it, and wish to take a deep dive into to get a deeper understanding.

This is the perfect book to start out with, and I also enjoyed it as a more experienced photographer.

X-Pro 2

August 21, 2017

I loved my X100T, and I love my X-Pro2, but it is a little bit too small when I walk around for hours after hours shooting non stop. If you are going to get one accessory for your X-Pro 2 or X100 then I’d get a thumb rest.

The basic idea is that you are this little piece of metal to the flash hotshoe, that extend a curve against the right side of the camera. Giving you a surface to rest your thumb on. The result is a more ergonomic experience, if you have larger hands.

The good thing about smaller cameras are that they are smaller, easier to have with you everywhere, while the bad thing about smaller cameras is that they are way less ergonomic in many ways. Or I do at least think so.

I added one of these to my X100t, and it made it much more comfortable to use. And I did the same with my X-Pro2. I either had to do this or add a larger grip. I personally prefer this because it doesn’t make the camera larger, while giving me more or less the same thing.

You&#8217;ll find cheap ones, and you&#8217;ll find expensive ones. They do more or less the same thing, and both work. The more expensive ones are much better; the paint don&#8217;t rub off; you don&#8217;t have to use a screw to secure them. I use the ones made my Lensmate (order them directly if Amazon won&#8217;t ship them to your location).

Analog Photography

August 14, 2017

Let me preface what I am about to say by defining what I mean by analog photography. Because analog cameras comes in many shapes and forms. Everything from point and shoot, to very advanced SLR models to the ones that might have one but don’t require a battery.

What I am talking about here is:

<li>

  A system camera: you can change the lenses and set settings like shutter speed and aperture manually.

</li>

<li>

  It is mechanical. This means that the only thing that require a battery (if there is one) is the light meter. Everything else works fine without a battery.

</li>

<li>

  There are no “auto” modes.

</li>

There are many reasons to why I love analog photography: focus, simplicity and relatively cheap gear. I think digital SLR or digital range finders are the best place to start learning because you can shoot so much, without costing you that much money. You are set if you get a crop sensor camera, a 35mm lens, some batteries and SD cards. And the only cost moving forward after that and a Lightroom license is electricity and external hard drives if you fill up your computer. While analog have a real cost connected to it. Around $10 USD per roll of film, and usually 2-3x the cost of a roll to develop it; if you dont do so yourself.

My current camera is a silver Nikon FM that I inherited, it came with a 50mm f/1.8, and I also bought a used 24mm f/2.8. I mostly use the 50 because it is <em>my</em> focal length, and it is so much lighter.

If I go out with my FM to shoot, I usually just bring a few spare rolls of films. And that’s it. I have used it for around a year, and the battery is still going strong. What would be the result if the battery died while traveling or being a place I could not get a replacement? Well, I’d just use the f/16 Sunny method (Sunny day, 1/100, f/16, ISO 100) .

My X-Pro 2 is a little bit more of a drag to get it all sorted. I usually havet o check how much room I have left on my cards. Then I usually bring at least one spare battery.

You can probably get set up with a excellent analog SLR + a really good lens for less than the price of a entry level DSLR kit. And if you are willing to pay a couple of thousands of USD, you could get the camera I really want: a Leica M6.

The most important thing I have gotten from shooting film for around a year now is a much better understanding of focusing, exposure and speed / ISO.

When you shoot digital, you are used to being able to change the ISO as you please. This is not the case for analog. Instead of having a sensor, you have a roll of film. This means that you need to figure out what is the best compromise for the kind of shooting your are doing the next X. In other words: until you have shot 24 or 36 shots.

You can push or pull (shoot at a higher or lower ISO than it is rated as) but you need to do so for the whole roll.

My personal preference is to shoot 400 films. I prefer Fuji Superia for colour and Ilford HP5 for black and white. Sunny day: ISO 400, and I usually push to 800 in general or 1600 if it is really dark.

Again. You can’t switch it up in the middle of a roll.

The first thing you learn when you start shooting analog, with the kind of cameras I like is how focusing really work. I kind of knew how it worked. The basic idea is that you twist the focus ring until what you want to have in focus are in focus. You can also do so by using a distance scale on many older lenses (and Leica lenses). The F-number shows you what will be a focus in terms of meters / feet with your current focus point.

The second thing I got into my fingers is how different exposure settings impact each other. For example: with this film I can’t shoot here, because it is too dark. Or I can’t go down to F2 here, because my camera don’t go above 1/1000th of a second, and I use a ISO 100 film. Or I either have to go for a very slow shutter speed (potential shake / blur) or I need to go for really shallow depth of field).

You have all the same problems wit ha DSLR, but you almost always have extreme shutter speed and ISO options that you can get a compromised version of what you thought you wanted.

If you think it is a hassle to adjust all of it yourself, you are kind of right. But it is much easier when you have physical dials for everything. You usually just pick “I want this shutter speed” or “I want this f-stop” and adjust accordingly. And it is much easier to focus manually on cameras that are made for it. SLR’s often have a micro prism and range finders are rangefinders. Both are based around the principle where you only need to make sure that the stuff in the “focus area” line up.

What would a true digital Leica M look like

August 12, 2017

If one would pick the three most influential camera’s in history, I would say the Leica M3, then the Nikon F4 and last the iPhone. The reason is that the M3 basically invented 35mm photography and how cameras looked and worked up until the SLR; the F4 is the prototype for how SLR’s looked and worked from it was introduced up until today. And nobody thought of phone photography as anything but a gimmick before the iPhone; not the first one though. Probably the 4S?

Anyways.

If you look at the Leica M series from the M3 up to the M6, you see a camera that has just what you need to create. Combined with build quality that makes it possible for cameras made in the 1950’s through the 1990’s to still function today. The reason is that Leica continues to service them, and all of their modern M mount lenses are still compatible and neither the batteries nor the film is proprietary.

There have been a few attempts at making digital Leica M’s- But I’m not convinced that we have seen the first true Leica M. There are a number of reasons for this. Most of all because they are too much like a digital camera and not enough like a true M.

If you pay $8000 for a camera, then you either expect the best technology on the market or something that is built to last. All analog Leica M’s were expensive new. But that is fine if you can use it for over 60 years when its maintained properly.

I think that a Leica M digital camera should look and work like a M6, except for the thing that advances the film and the thing you use to rewind it. Those can we just get rid off. But the rest should be the same.

A ISO dial.

A shutter speed dial

You turn it on or off with the shutter speed dial.

And no screen or additional buttons.

There should be a “analog” counter like you have on a M6; but it should show how many more pictures there are room for on the SD. And it should use standard batteries you can get in any photo store.

The view finder should not require any form for batteries, and the only parts that should use battery power is the sensor (when its in use), the light meeter and the counter thing I mentioned above.

And of course no auto shit; we are talking about a Leica M after all.

But. If this is a camera that is going to be useful in 20 years, then they need to be clever regarding the sensor. A 24MP Full frame sensor is probably good enough for the nest 5-10 years for most people. But I still think they should be upgradable. Send it in to Leica to get the latest generation “M” sensor in it. Just like a M3 from 1954 can use the latest in 35mm film technology.

Let Leica be Leica.

X-Pro 2

August 10, 2017

I have spent some time, but not that much, since I got my X-Pro 2 figuring out what kind of lenses I want to get for my new camera. And this is one of the good things about not having a mount like the Canon EF which has history going back to 1987 where you have numerous generations of lenses from both Canon and <em>many</em> third parties. You can literally spend days if not weeks researching and comparing primes of one specific focal length.

My current lenses are the 35mm F2, which is the lens I shoot the most with. And then you have the 50mm F2, I was going to sell it, but I have decided to keep it, because it is long enough for when I need a longer lens, while at the same time being wide enough to be useful if I’m going out with just that lens.

Then I’m going to get the 23mm F2, following the trend of doing for lenses that are not too extreme to be a single trick pony.

With the 23, 35 and 50 I’ll have everything I need, and all of them are focal lengths I’m very used to.

Then I’m pretty sure I’m also going to get Samyang 8mm F2.8 fish eye, because I have always wanted one. And while being a manual lens and not that “useful” I always think very distorted images are cool and fun.

And the last lens I’m going to get is another 35mm, and that is the Mitakon F0.95. One of the lenses I have always wanted is the Leica 50mm Noctilux, it’s indulgent, heavy, cost the same as a fucking car but the images look amazing. The Mitakon isn’t <em>that</em> expensive, but it is a manual lens, and I want it for when I’m shooting in darker situations. My personal experience is that autofocus isn’t that useful in the dark anyways.

This puts my plans to save for my dream camera(A Leica M6) on hold for a while, but I will on the other hand have all the lenses I need and want.

X-Pro 2

July 06, 2017

I have been shooting with the X-Pro 2 for a while now, and I think it is the perfect camera for me. But there are of course a few things I wish were different.

First, I wish the exposure compensation dial had a press to unlock button like the shutter speed.button has, because I adjust it by mistake way too often.

Second, it would have been awesome with a physical dial to adjust the drive mode (single, bracketing, burst etc) to make it faster to change between shooting the different modes. I personally often switch between burst and single.

Third, I wish the menu’s was more like the play / display images function. Never show it in the view finder and always on the screen. Because I always have the screen off unless when I chose to use it, to save battery.

]]>

X-Pro 2

July 06, 2017

There are no technical reason for shooting in manual in most situations these days. But I love shooting with mechanical analog cameras, and I also enjoy shooting in full manual on other cameras that are designed to do so.

The Fuji X-Pro 2 is without doubt a very good option for this.

I think it is a healthy training exercise for photographers to shoot manually from time to time, in order to really understand how the different parameters work.

The experience of shooting in full manual mode on a DSLR like my Canon 650D was a horrible experience, because you don’t have a histogram in the viewfinder and because you don’t have physical controls and because there are no tools to help you focus. It takes forever and isn’t fun.

Doing it with the X-Pro is fun. Just turn on the histogram, twist the ISO, Shutter and Aperture unit the histogram give you the proper feedback, and then you just focus and shoot.

The reason it is so much better, in my opinion is that you can adjust all of it without looking away from the view finder, and because Fuji cameras give you zooms into the focus point makes it very easy to focus correctly.

Another fun way to expose, is to use the <a href="https://www.slrlounge.com/photography-essentials-the-sunny-16-rule/">Sunny 16 sytstem.</a>

Fujifilm

June 28, 2017

I got my Canon EOS 650D a little bit over four years ago. I think it was during easter. The funny thing is that it was during easter it started to “act up”. The screen started to black out for hours at a time. The camera still worked, but I didn’t really trust it after that. The camera was almost a year old when I got it. So the majority of the pictures I’ve taken have taken have been with either the X100t or with a sensor that is five years old.

My plan was to get a 5D, when my 650D died. But I changed my mind. The reason is that I fell in love with Fuji from my experience shooting with the X100t and dedicated dials shooting with my Analog Nikon FM.

I still think the X100t is a great camera, but the focal length never felt “right” for me. I feel much more at home using something close to a 50mm. equivalent . But what I got out of my experience with the x100, is that I love how close to “ready” Fuji’s raw files are. And how much more fun it is to use their cameras.

So I got a black Fujifilm X-Pro 2, with the 35mm f2 lens, and I got a 50mm f2 lens with it for free. This is the perfect camera for me, and I love everything about it; except for the battery life.

The body is metal, and you can feel it. Not from the weight. But rather from how solid everything feels. Great build quality. And the experience shooting with the camera is great. You get what makes it fun to shoot with a mechanical analog camera, combined with the amazing image quality of modern digital photography.

When I look at the images I got out of this camera. The increased number of pixels and the vastly improved dynamic range. The jump feels similar to the one I did when I jumped from point and shoots to DSLR’s.

]]>