Chasing the Sun

Recently, I posted this photo to my Instagram account.

Unexpectedly, some media shared the photo, and soon enough it went viral. Well, mabye better to say “locally viral”. But at the same speed, comments like “it’s fake” and “it’s photoshoped” arrived. Tbh, I didn’t care much. There was something in that feeling of having my own 5 minutes of fame, that made me want enjoy the moment, and not to get into dispute with these who doubt. But at the same time, I understood them. I also couldn’t believe with my own eyes when I saw that yellow blob on the back screen of my camera.

Anyway, what I want to share here, is the process I went through before I made this shot. And it starts way before I clicked the shutter button for the pic above.


Last autumn I decided to challange myself and to improove my photography. For two weeks, every morning before job, I was wandering around the city, looking for inspiration. Couple days into explorations, and I figured out that it was the period of the year, perfect for foggy mornings, so I focused my exploration to the areas around water.

But not every location “behaved” the same way, so I started thinking more about where exactly the sun will rise, what are the weather conditions, temperature in the morning etc. I made some shots I was happy about and then the winter came. My beautiful mornings with a golden sunrise were over, but the experience of searching for a perfect location stayed.

Searching for a location

This part is about finding a potential spot for making a nice morning photo. It also applies for shooting a sunset though.

The sun does not rise exactly on the East. Tools like or Android app Golden Hour can show where exactly (azimuth value) the sun is rising (and setting) on a given date, relative to some point on the map. You can use this info to visualise the scenery if you are familiar with it, or to make some predictions at least if you are not.

Golden Hour app, showing a position of the sunrise on April 2nd

For example, if I want to shoot a famous “house on drina river“, using the mentioned tools, I can at least have an idea how the result photo will look like, and that, if I want to see the sun setting down behind the house, I need to be there probably in January.

Having the above on my mind, somewhere at the beginning of the year I did a homework and ‘scanned’ the city I live in (Novi Sad, Serbia) for the sun alignments with some landmarks, streets, buildings.. I am familiar with the surroundings so it was easy for me to visualise the result. One boulevard that I found pretty interesting is straight for one kilometer, ends with a bridge, and at some point the sun will rise just “behind” that bridge. That seemed cool in my head and I noted that date. April the 2nd.

Exploring the location

I went to check the location about month before and it wasn’t anything special. Here’s the proof below, made later though. I was also disapointed because the bridge was invisible because of the distance. Lucky me, I had a Nikon 200-500mm collecting dust, and considering that, the idea seemed feasible.

Same location, nothing special

While exploring the location, I thought about where I want to ‘put the sun’ on my photo. I thought it would be cool to put it ‘on top of the bridge’. But to be very precise and to have the sun “click” at the top, you need have it at the exact altitude. Apps like Dioptra can give you aproximate value, but there is an error. Mostly due sensors imperfections in your phone.

The target was set on top of the bridge, and the altitude value (on the right) is 1.8 degrees.

For example, the altitude value above is 1.8°, but sun’s altitude on April 2nd when I took the photo was 0.2°. Azimuth value (66°) also differ from the one in Golden Hour application or (82.2°). So take these values with caution. If you are able do the some math on the paper, based on the altitude of the object where you want to ‘place’ the sun, and the distance. Simple arctan function will do.

Before the D-day, check the weather

On some other occasions I was waking up really early, driving couple hours to get to the location, just to see clouds. So check what the local weather predicion is saying.

D-day, be there early and setup your equipment

You want to be there at leas half an hour early. You will need some time to unpack your gear, to setup the tripod, take test shots. Check different framings, change positions. You don’t want someone else to take your perfect spot.

Set correct exposure, ISO, aperature. Keep in mind that as the sun goes up (or down) the ammount of the light changes drastically, and you need to update your settings accordingly. But at least have some initial settings set.
Try to decide what you want to achieve. My reasoning was that I will be shooting right into the sun, so I was afraid of having too dark and too bright areas on the photo. I was bracketing with +/-2 exp for that reason. Also, there was traffic going around, and I thinked about the postprocessing, so I made multiple shots, just so I have material to erase a car that I don’t like later.

Wait for the right moment

It’s easy to say. As I was shooting straight to the sun, I was watching the frame in live view mode (if you are shooting directly into the sun, with 500mm, you probably don’t want to look through the viewfinder). When I actually saw with my bare eyes this big yellow blob “moving” on a LCD (totally unexpected), I lost my mind a little bit. At that point the sun was still to the left of the bridge and quite below, but it was impression. I started shooting way before the right moment, in a fear that I will miss something.

Take that shot

When the sun parked between the light poles on the bridge, I knew I had the shot. But I continued shooting more material (for the purpose of removing cars if needed).

Go home, and take some more sleep probably..

At this point, this tutorial ends.

Bonus: Photo ‘aftermath’ for the suspicious

As I already said, I had no idea that the sun is going to be that big. I was amazed! People who didn’t witnessed this scene are suspicious. And I understand them. Sun is very big and looks like clipart. So here is a bit of math just to proove the dimensions on the photo.

For this purpose I used lens calculator and google.

I took a photo on Nikon D7200 with Nikon 200-500mm, at 500mm, f8.0.
Using google maps I measured my distance from the bridge, and the bridge width. It might be a bit unprecise, but it will do.

Distance from photographer to the bridge top = 1000m
Focal length = 500mm
Nikon crop sensor

If you enter these data into lens calculator, you get the following result for the vertical angle of view:

Vertical FoV = 31.2m

I shot a photo in portrait orientation, so vertical and horizontal axes are swaped basically.

Using a bridge width (14.2m) measured on google maps, and the result from previous step, we can calculate the ratio of the bridge width on the photo like this:

Ratio = 14.2m / 31.2m = 0.45512

If we multiply ratio with the photo width (original, not cropped), we get expected bridge width in pixels on the photo

0.45512 * 4000px = 1820.48

Cool, now let’s measure the bridge on the photo. At first, I was measuring from fence to fence and I got a result that differs about 90px from the calculated value. It could be a measurement error, but then I figured that light poles on the bridge actually goes behind the fence. Doing another measurement, between tops of the light poles, I got a result of 1818px. And that’s, as expected, quite close to the calculated value.

Now let’s use the values for the sun. Google the sun diameter and earth to sun distance, update the values in lens calculator and update the formula:

Sun distance fom Earth = 150.91 million km
Sun diameter = 1.3927 million km

Vertical FoV = 4.71 million km

Ratio = 1.3927 / 4.71 = 0.29569

Expected sun diameter in px = 0.29569 * 4000px = 1182.76
Measured sun diameter = 1171px

It’s about 10px error. Nobody would bother to photoshopt a sun just 10px larger. So there you have. Math proof.

Right time for photography!

This year, the autumn made me fill my memory cards faster than I had time to empty them. Weather conditions in past several weeks in my surrounding (and probably wider) made mornings extremely photogenic.

Waiting for the fish by Aleksandar Beserminji on

Nights were cold, days were hot, and that created a lot of fog in the mornings, just above the ground and especially above calm water. While it was raising up, sun rays were coloring it to a golden fire.

All that made me want to wake up in the 4am, enjoy it, and have an adventure every morning. Although, the adventure was actually beginning the evening before, while I was planing where I will go in the morning, while the city is still asleep.

Checking the weather conditions, calculating when and where the sun will rise ( and searching for a location where the sun will potentially align with something interesting, as well as planning how and from which side will I approach the location.

Swan in the morning

When the sun finally goes over the trees and burns all the fog, I was going home with a memory card full of photos. Sometimes I was muddy and wet to my knees, but I was sure I have photos I will like.

go(ing) to Meeting C++

How I got to the Meeting C++ conference?

One morning, while listing through news and warming up for the working day with a cup of coffee, I find this topic on Reddit about Meeting C++ in Berlin. Now, ticket for Meeting C++ isn’t something that I could afford for myself, and my company probably isn’t interested in paying it. So I took a chance and applied for a supportive ticked.

Couple weeks later I got an email from Jens informing me that I got a supportive ticket. Excellent! Instant happiness hit me hard, and I immediately confirm my attendance and reserve the flight and accommodation.

Fast forward week ago, there I am at the opening of the conference. The room full of people, and Jens starts the opening talk. He represents sponsors who did this and that, and that… And as much as that’s not the most interesting part of the conference I heard that there are sponsors who sponsored supportive tickets (aka my ticket). It was Native Instruments and Conan. So this blog is actually a way to say a BIG thank you to the Native Instruments and Conan for supporting my ticket, and an intro to an ongoing series of couple blogs where I will write about some interesting stuff I heard at the conference.

You can check more about the conference here, and check the slides here.

Log execution with GDB

Here is a sequence of commands which may be handy when debugging with GDB. It’s a sequence which allows you to go through the execution and log all the output into a file. And it does that automatically.

set logging file output-file.log
set height 0
set logging on
set logging redirect

while 1

  • with first command we set a output file where we expect our log after the execution
  • set height sets our screen size, overriding it to 0, so we don’t get messages like this:
    • “—Type <return> to continue, or q <return> to quit—“
  • logging on enables logging
  • and logging redirect doesn’t show output on the screen (which slightly speeds up the process)
  • while loop executes commands inside the loop while the program is running. Instead si, you can use n, ni, s or any other like p or maybe x/i $pc. Just be sure to use at least one command like s or n (which execute), so that you don’t end up with the loop running indefinitely.

Getting started with LLVM

There is actually a really great introduction here:
And that’s the starting point.

Regardless I’ll explain the checkout and build procedure here in my words, emphasizing things that were unclear to me when I was checking out the Clang/LLVM for the first.

Wyvern, the LLVM logo
Wyvern, the LLVM logo


So first thing is to choose a version control software which you want to use. You can choose between SNV and GIT. Checkout here a bit more on that.
At the moment of writing this text LLVM is using SVN primarily, but there is GIT repo and initiative to move it to GIT primarily (
Anyway when you decide between SVN and GIT, you can use it to checkout the project. Use following commands in terminal:

git clone llvm-src


svn co llvm-src

Both commands are going to checkout the project to the folder llvm-src. You need to run only one of them.

Beside LLVM project you’ll probably need to checkout the Clang as well. You can read here more about it: LLVM projects.

Again, type one of these to your console:

git clone llvm-src/tools/clang


svn co llvm-src/tools/clang

Now you have clang in your llvm-src/tools directory (just the place it should be).

So from this step, let’s try to build it for your platform (x86 I guess).

Building process

The code you have checked out is a source code. From that code you are gonna build a project into executable binaries. First, create a folder where you want your build to stay. Let’s call it llvm-build, and then enter it.

mkdir llvm-build
cd llvm-build

Now execute following command, with appropriate modification if the path to your llvm-src folder is different.

cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=True ../llvm-src

First option ‘-DCMAKE_BUILD_TYPE=Debug‘ means that the project will be built in Debug mode, which will allow you to run it in gdb. If you don’t need it, replace Debug with Release.

Second option ‘-DBUILD_SHARED_LIBS=True‘ means that libraries will not be linked statically, which will result in much faster compilation and the process will be less memory hungry. If you don’t have specific reason to link it differently, use this one, trust me.

The last one i the path to the source folder.

Press enter, and watch how cmake is configuring a build. It might happen that you don’t have some libraries or necessary tools on your system; in that case cmake will result in error. Just install these tools, and then run it again. If you believe that cmake got stuck, and every time you run it, it just doesn’t work for some weird reason, you can also run this command from the llvm-build folder:

rm -rf *

Be careful with this command and take care that you are in the folder llvm-build. Then run cmake again.

Once cmake finishes successfully, hit the following command:

nice make -j6

Now go for coffee break or enjoy watching your llvm building.

Testing if everything is fine

LLVM and Clang come with a bunch of tests that verify that everything works as expected. When some developer implements a new feature, he/she also provides a test for that feature. So when someone else is working on LLVM, they can easily check if they did not break something. These tests are called Regression tests, and they don’t cover all possible functionalities, so if you implement a new feature and none of the tests fail, that does not mean you did a good job. Furthermore, you should think about test you can write that is going to test all cases of your new feature.

Anyway, to run these tests, type the following:

make check


make check-all

You can also type something like this:

make check-llvm-codegen-mips

which will check only llvm, part codegen, and architecture mips. Go and check the tests folder structure to figure out what I am talking about.

When you need to test only one test, not a bunch of them like in previous cases, you can do that with llvm-lit script located under the llvm-build/bin folder. Simply type a llvm-lit and a path to a test you want to run. Example:

./llvm-build/bin/llvm-lit llvm-src/tests/llvm/codegen….

Please note that sometimes developers make mistakes, and freshly checked out Clang/LLVM may have some broken tests. In such situation, just update your local repo and run the build and tests again.

More testing

Beside regression tests, there is also a test suite that you can checkout, build tests and run. But I’ll write more about that in some other posts later.

Student exchange – Åbo Akademi, Finland

At this point, it’s been more than a year since my student exchange at Åbo Akademi in Turku ended. Still, every time I remember some event or talk to my Erasmus friends about some happening, I relive these moments again and again. And every time it feels great!

My story starts somewhere in the middle of my master studies. I got an idea to go somewhere for an exchange. Almost all exchange programs at that moment were closed untill the next year, except EUROWEB+ program. They opened the second round of application. Quickly, I gathered all the necessary documents, wrote biography, motivation letter, etc. and then after more than a month, I got a confirmation that I was accepted. From that moment, things started to happen even quicker: find a best deal for the airplane ticket, apply for visa, apply for a dormitory, prepare everything else… And then finally, the D day arrives: it’s time to fly. Get up early (actually I wasn’t event sleeping that night), catch a bus, catch a plane..

When Finnair finally set down at Helsinki, after a lot of turbulence, I immediately sensed the difference in temperature. I also felt how kind were people who works there at the airport. I caught a bus to Turku, met some other students who arrived here for the same purpose as me, and spent the rest of the ride sleeping.

In Turku, my tutor Ida waited for me and one other girl on the bus station. She walked us to our dormitories and gave us our starting packages. I am not sure if such thing exists elsewhere, but it’s basically a box with some useful items for the room and the kitchen while you are there.

The morning after, we had a introduction course at the faculty. It’s called the orientation course and last for a week. We got all the necessary information there: what is the grading system, how we register for the classes and the exams, things about the health insurance, what do they expect from us and what are our obligations, and many more. During that course, I also changed my learning agreement, because some of the subjects overlapped in the schedule.


So for those who are curious, here are the subjects I have chosen:

  • Advanced computer graphics and graphic hardware
  • Special Course in CS: Distributed systems and algorithms
  • Special Course in CS: Graph Algorithms
  • Special Course in CS: Local Networks
  • Real-Time Systems
  • Evolutionary Algorithms
  • Neural Networks

New thing for me was that some of the classes were not “gradable”, but instead you just get Pass/Fail at the end. No grades/marks.

Also, in Serbia we have semesters where you listen to some courses for the whole semester – for about 4 months. At Åbo Akademi, semesters are divided to two periods and you have different classes each period.

Interesting thing was that we had actual homework there! I haven’t had that since the high school, and it was cool. It was also possible to gain extra points for these homeworks, and it’s even possible to pass some classes just by doing homework. Just to make myself clear, it’s not easy as it sounds.

Before I move on to other aspects of exchange experience, I’d like to single out the Real-Time Systems class, because the professor was outstanding, and the way he presented lectures was very interesting and remarkable and easy to understand, even though the class itself was not that easy.

So now regarding non-academic part, there was everything. Literally. With other exchange students we have been organizing international dinners, were watching movies, traveled together, visited Santa Clause, we drank – we sobered up together. Climbed up to the roofs of some buildings, walked over the frozen sea, we were going to sauna an then ran naked on the snow, fell into 2 meters deep snow, and barely got out. We ran at 3 AM because the sun didn’t go down, laughed, hugged, helped each other, cried when we were going home.. Promised that we will gather again one day and relived that day as those six months behind us. We made many memories which are hard to explain using words, especially to the people outside of that context.


Now there are some things I learned about Finland while I was there, to which I was not used to. And these are good things. For example, security in the clubs is not always uneasy and edgy, that people know how to enter the bus on the front door an to pay the ticket, that these same buses don’t have to be smelly and dirty, and that the drivers don’t need to drive them like  a rally. When you miss some document in the bank it’s not a problem, they will fetch it from the university via phone if it’s possible. And if you loose your phone or wallet, they will find a way back to you.

Anyway, for me, this is one of the most valuable experiences in my life till now, and I will probably remember and talk about it forever end ever. And I am really eager and I am looking forward to meeting all these people again one day, some where..

RCBoat got an upgrade: ESP8266

After some time spent trying to bring my IOIO back to life, I decided to move on and to equip my RCBoat with a new controller – ESP8266. It’s a cheap wireless module which became popular very quickly and got a huge community around itself. Because of its price and size it is really easy to use it to connect any device to the Wi-Fi, and to make some cool IoT device out of it. There are also several different firmwares available for it, but maybe the most popular is nodemcu, which allows you to do programming in Lua programming language. Overall, quite pretty module to have for a couple bucks.

Taking all of that into consideration, including my curiosity for the new ESP module, it seemed like a reasonable decision to use it as a controller for my RCBoat. And so it was.


The interior of the boat had to be reorganized, a bit squeezed as ESP8266 requires 3.3V voltage regulator as well, also some mechanical improvements were made, but at the end everything fit nicely.


ESP8266 is flashed with nodemcu firmware and programmed to behave like an AP (Access Point) which allows me to connect to it using my phone. It is also programmed to receive data and control the rest of the electronics inside the boat. On the phone, I made a Joystick app, which is sending controls to the ESP8266. Both source codes for ESP8266 and the Joystick app for Android are available on my github page.

So after making a nice water sealed package and several successful tests in the bathtub, I’ve made a ride on the canal too. This time there were no connection issues, except when I pushed it quite far away. So now enjoy the video 🙂


Queue monitoring service

Like many other things in Serbia, Student Center of Novi Sad is in some ways old fashioned, and doesn’t like to change how things work. One of things is the way how students apply for the student accommodation and how they pay for it. It’s very simple: you go to the office, you wait and then you apply/pay for the accommodation. No online mess and trouble. Most of the time, waiting time is short, but as deadlines approach, waiting room becomes a bottleneck and many students have to wait, sometimes even for couple hours.

Luckily, the waiting room is equipped with a ticketing machine, so one you get the number, in theory, you can go and do other things you have to do. The problem is that while you are away, you do not know which number is processed in the office, and you can easily miss your turn.

So after some time spent thinking about how could I make things better for us, students, I decided to create queue monitoring service. It would not abolish the queue you saw in the video above, but it will give students a possibility to move away freely without missing their turn. So it led to some investigation in the beginning and system design after, and at the end to some coding ofc. On the diagram below is initial system design, all together with SMS service which was never implemented due some bureaucratic reasons.

System desing

Excluding that, everything else fit well and is working well since it was installed. Ok, maybe not always; sometimes it does happen that local computer stops working, and that service stays outdated for couple hours/days. Right now, the idea is to change ‘local computer’ on this diagram with Raspberry PI, and leave it somewhere in the dark forever alone to do its mission.


Anyway, you can download an app for Android here, or check status online here, but if you are not a student in Novi Sad, then this information might not be useful to you. The thing that might be useful to you is on my github here, and it’s a source code for the local service and Android app. Maybe you can use it and help someone else not to wait in the line for too long 😉

Which camera type should you buy?

Recently I noticed that almost all compact cameras are exchanged for phones or big DSLRs. I never actually counted how many people (mostly tourists) are using compacts cameras or DSLRs, or nor I did any statistics, but all these big cameras are somehow eye-catching. It became trendy. So I have decided to ask some proud users of DSLRs (again, tourists and some acquaintances) what is the reason for buying one. Answers were mostly similar and refer to image quality and affordable price.

Now, I really don’t mind someone else carrying big and heavy DSLR around their neck, but let’s see is it really necessary.

It all starts with the light. If there is no light, there is no photo. That’s why it’s important to handle the light properly. We use lenses for that. There are many different types of lenses and they affect the light that is passing through on different ways. Better quality lenses are putting through the light ‘on a better way’ so more information are preserved when the light exits the lens on the other side. And when that happens, the light will hit the sensor. The sensor is a vital component in photo formation process. It ‘reads’ the light which hits it, and transforms it into a digital signals which are later transformed into a file which you can open on your computer. The better sensors ‘reading’ skills, better results. Transformations that come after the reading are also important, but let’s keep this as simple as possible and assume that transformations are always done well and we don’t have to care about it.

So basically you need a good (big) sensor and good lens for good quality photos.

Bigger sensors are better sensors. You can find many topics about that online, but long story short, bigger sensors have better low-light performance (will make less noise in photos with higher ISO), they have better dynamic range and as bigger they become, they make more background blur.

Now let’s check sensor sizes before we continue. Here you have different sensor sizes compared from 1/3.2″ to Medium Format.


And now, DSLRs from the beginning of the story, they do posses bigger sensors (usually APS-C or bigger) than compacts, which makes them quite a good option to buy. They also come with some sort of quality lens, at least better than most compacts. But they are not the only option.

A couple years ago, manufacturers introduced mirrorless interchangeable-lens cameras. These cameras usually have bigger sensors than compacts, and allows you to change lenses. Which is cool! They tend to give you quality of photos as DSLRs do, but they are also tending to be small. Unfortunately the size of the sensor dictates the size of the lenses, so bigger the sensor bigger are lenses.

TLDR, if you want really, really good quality photos, take some mirrorless camera or some DSLR if you don’t mind carrying it all around. Otherwise, if you want something slightly better than your phone photos, take some compact. And if you don’t mind the quality of your phone photos.. well, then you have no problem 🙂

UPDATE: Below you can find a comparison of camera types, cameras and sensor sizes, which might be helpful to illustrate the described situation.


Sync your clock when shooting with a partner

One day, totally at random, some guy asked me on the street if I’m am being available to cover an event that they organize. I am a hobby photographer and usually I shoot what I want, when I want, where I want, and I didn’t have experience with such things. But I accepted the challenge. It was a Cameroonian association dinner party, followed with many different activities with 100+ people present.


After I got timeline of the event and started planning everything, I realized that I might not be ‘enough’ to cover everything as I am not skilled enough. So I decided to call a friend for help. She accepted the invitation, we did quite nice job and the client was happy at the end.


But even though I tried to think about everything I didn’t think about how are we going to merge our photos after the shooting, and that gave me a small headache. When I copied all the photos (~2×500 photos) from our memory cards, I found out that I have a bunch of photos, with no pattern I can use to separate them. So I had to do it manually, and there was a lot of job, because that celebration included many different sections: red carpet, opening ceremony, prayer, dinner, drama, fashion show, etc. I lost maybe 15-30 minutes on sorting all the photos, and maybe it’s not too much, but I would be more happy if I didn’t have to.

Check these instructions (Sync Multiple Camera Time Stamps In Lightroom 4, Fix Timestamp Issues on Multi-Camera Shoots) if you’ve already did the same mistake.

So I was thinking what could I do to make it better next time, and realized that I can sort photos by the time they were taken. But there is a catch: for that you need to sync clock on your cameras that you are doing shooting with.

clock sync

If you are using more cameras or if you are shooting with a friend, just take some time before and configure your clocks to show the same time. After that you can easily sort them by time on your computer.

  • 1
  • 2