613 karma · joined June 24, 2015
Header only is nice and easy, dump file in the project, #include and your job is done.
This was all donkeys years ago, so it is interesting to hear how things have changed.
Prior to doing this (requirement for my job) I didn't have any particular set up, so in comparison this feels really good.
Main grumble is I don't pay for Dropbox so have a device limit, so end up just downloading database onto extra devices which mostly works but sometimes requires redownloading to get latest and potentially uploading to Dropbox if I have created a new password. Maybe I will pay for Dropbox sometime (as let's face it, it is useful beyond this case).
For the last 18 months my phone is on silent, no vibration, so I am completely oblivious to whether someone is contacting me. When I check my phone I catch up with any missed activity. It is hard to explain just how much better it is to operate this way.
I guess one thing I find is it is easy to find really good recipes of long running favourite dishes and be able to substite our chicken, or beef mince with a vegan alternative and still get the full rich flavours of the dish, with the right texture, filling power, protein levels, etc of what would have been meat.
FWIW here are some of "my" recipes (ones I have found elsewhere and catalogued together on one place) which have been well received by family and guests: https://www.copymethat.com/recipebox/steven-craft/3775240/ if there is any mention of meat then substitute with the products mentioned above.
Damned if you do and damned if you don't.
Anyway, I do not want to sidetrack from this amazing achievement.
Then again, I have also travelled the length of the Trans-Mongolian railway (St Petersburg to Beijing) and across the States (California to New York) by sleeper train!
1. I travelled the world for a year.
2. During that time I took lots of photos (around 10,000).
3. I put them into albums per city (around 150).
4. I wanted the photos in date taken order per album.
Sadly Flickr doesn't provide a nice way of doing this, you can edit (organize) each album, one at a time, and set the order to date taken. But if you later add another photo, it will just go at the end (and not maintain the date order). I found this to be quite a pain, and as the number of albums increases, it just gets worse and worse.I thought when I get back from travelling I'll write something to fix this, and to my surprise, I actually did just that. The source code is here:
https://github.com/Scraft/flickr-album-sorter
And the online implementation is in the posts link, I mentioned it on the Flickr help forums (as I have seen various people over the years asking for this) however no-one, other than me has actually used it! I was hoping to get a few more users before posting to Hacker News, so I could fix up any problems, see how much load the server can take etc. But given the lack of enthusiasm on the Flickr forums, I figured I would risk a post here!
It is my first personal project to be posted on Hacker News, constructed criticism very much welcome, my day job is working with code, but not stuff like this, so all a learning process! I went for Python + MySQL as I have a web host that I can access that allows me to run CGI and I typically use PHP and dislike it (much prefer Python) so I jumped through a lot of hoops to get it working this way (knowing full well if it was a service which was being accessed with huge volumes of people, it would need to be written in something more fashionable, like NodeJS).
ARMv7: 98.1%
Intel x86: 1.7%
I think a lot of the Intel stuff has been discontinued, not sure what is actively being developed outside of ARM right now.I use up about 1.5 loaves of bread per week, so some weeks I buy one loaf, some weeks I buy 2. If it is a week where I only need one, but it is BOGOF I just buy 2 and put on in the freezer (and then take it out the following week). It is a similar story for cheese (although that doesn't need to be frozen, staying in the fridge, sealed, lasts for long enough).
One of the bigger savings we have got from a food perspective is to move towards making a 'menu' of food we are going to eat that week. Then buying the ingredients needed for each dish. This means little or no wastage (good on so many levels), being able to buy at a good price (rather than not getting something required then picking it up at somewhere convenient buy more expensive halfway through the week) and knowing the quantities up front makes it easier to either buy in bulk, or knowing when a deal that involves extra quantity will be suitable.
The above approach has also meant eating much healthier food, not finding ourselves in a position where we order take away because we don't have anything in. Ensuring we have not only meals planned, but healthy snacks (fruit etc) factored in too. It isn't a binary choice of by doing this we get everything 100% perfect, but it has been a hugely noticeable improvement.
I have read several times that some of these approaches and typically favoured by those who have more disposable income, which isn't ideal, as we really want those with less income to be getting all the good savings to try to ease/stop the wealth gap.
"Why doesn't it take X seconds before I can start talking".
To which the engineers possibly explained the reasons and the product owner saying:
"But I want it instant, let's bypass all this extra stuff and get a proof of concept instant answer working"
To which the engineer said:
"But we'd technically be sending data before the call has even been accepted"
To which the product owner said:
"That's okay, the user can't actually see that data, let us just get this in for now, we can worry about the security/privacy side later".
To which the engineer said "but, but, but" saw the product owners eyes glaze over and just made the commit:
Commit 1279: Remove very important security/privacy feature of ensuring no data is transmitted until the call has been accepted. This is again my best judgement, do not come to me when this blows up, please speak to the product owner.
Then went to the pub in despair.
Anyway, the bottom line of this is: I have seen various pieces of code on platforms which when comparing a memory pointer you need to mask out several bits (unless of course you actually want to differentiate between the different access methods of the same piece of memory).
It isn't quite what this article is talking about, but I thought it was a related piece of interesting trivia to those that don't already know ;)
-Swimming with sea turtles in the wild
-Seeing whales breach right in front of me
-The feel of the finest sand I have ever experienced at Whitehaven between my toes
-Swimming in the warm sea
-Learning to surf with the perfect waves
-Sleeping in a ger with a family in Mongolia and getting an insight into how they live, what is important to them, understanding the things which can make people happy (which is very different to what lots of people think makes you happy at first glance)
-Hearing the emotion in a guides voice as he talks about the personal loss his family had due to communism, feeling connected to someone and caring instead of reading a fact in a book and it meaning very little
-Looking up at buildings I have seen countless times in photos and yet speechless, as the photo had zero impact on me yet seeing it in real life is amazing. For example the Taj Mahal blew me away, looking at it from different angles, seeing the detail close up, getting a true feel of the scale and spectacle of it.
-Dancing on the sand in bare feet through the night at a full moon party surrounded by people who are there to have fun and be happy. Sharing moments with other people. Moments that you can recall in a heartbeat throughout your life and mean something to you.
-Going to iconic places from films, tv, books from your childhood and feeling that sense of excitement which seems to erode away as we get older, but as an adult you still get that buzz when it is seeing something that meant something to you as a kid.
-Tasting home cooked food from an Indian family which tastes nothing like any Indian food I have ever tasted in the UK.
-Being surrounded by wild deer and feeding them special deer cookies. Laughing as they shake their heads around and then having to run away as too many of them surround us.
-Experiencing the lack of things, the lack of drinkable water from a tap, the lack of hygienic washing facilities, the lack of western toilets and getting so much more appreciation for what we have.
-Hearing what local Tibetans thinks about Tibet and China and contrasting it to what is put across publicly
-Seeing a sky full of stars reaching out to us from the opposite direction and being in the middle of the ocean or on an island without any lights on and get amazing views devoid of light pollution.
-Seeing how unfair the world is and questioning so much about life and how we are currently living it. Perhaps making life-changing choices, moving to a different country, changing vocations, etc.
-Filling up your senses with things which aren't available in the UK
I mean I could go on and on and on. I am 34 and have taken a year off to travel the world, seeing 20 countries, getting some classic Instagram snaps, drinking with a bunch of British people in remote places, doing things which are cliché and doing something which I don't even like for no good reason. Finding the most British food I can and being happy to taste coke. But that is all just one small part of the experience. When you have been in Asia for 5 months and have basically had a stomach which has never quite been completely right, the most western classic food can be very much welcomed. I personally find it tiresome to hear people for ever complaining about what you should and shouldn't do. If you want a Starbucks in Vietnam then have one, you don't have to drink their (very different) coffee (I have given up coffee so not something for me personally). If you like McDonald's in Malaysia then go have it (McDonald's is great in terms of something safe, reliable, cheap, easy, although not much good for me as a vegetarian).
Taking a year off to travel is one of the best decisions I have made. I am confident it will change my life (it already has) and also confident it will create memories which will stay with me and something I will always look back on positively.
No one can see everything in the world so it is more like curating it, you follow a bunch of curators, see a bunch of stuff, for some stuff a photo is enough, for others it makes you want to see it yourself.
I have had loads of travel ideas from Instagram and have visited lots of places after seeing posts on Instagram.
One good thing is that rather than us hitting lots of blocks with the hardware manufacturers with regards to the engine, Unity handles this instead and Unity is in a much better position to resolve issues due to their relationship with the hardware manufacturers but also the size of the dev team.
We still had several issues we had to deal directly with Sony/MS/Nintendo. Some issues they could resolve and others they could not (meaning we had to find elaborate workarounds or key changes to the game we didn't ideally want to make).
My role meant I had to make the correct business decisions using my technological knowledge and as much as writing engines and technology ran through my blood, the right answer was to switch to Unity. The man cost of constantly writing all the technology we need and then maintain it was too great compared to the ever diminishing wins we got from it.
One scary part of this decision was then hiring Unity programmers and initially having these new hires knowing more about Unity than I did. I needed to make calls about what is possible, time frames, performance, meeting client requirements etc without being an expert of the most important part of our development process. Luckily we made the right hires and it didn't take so long until I had been converted to the Unity mindset. Initially I would always be saying "oh well I would normally tackle this in this way" and wanted to coerce Unity to work in a familiar way. But overtime this disappeared and I became increasingly interested in working out the best way to achieve things in the "Unity way" which ultimately returns much greater dividends.
The first game we released, called Bloody Zombies came out last year on Steam, Oculus, Xbox One, PS4 and Nintendo Switch. It can be played in VR (on supporting platforms) and non VR. It is multiplayer, both in the sense of multiple people on one machine (you can do things like 1 VR player and 3 TV players or 4 TV players) but also online multiplayer (where you can do one player per machine or any combinations say one tv player on one machine playing with 1 VR players and 2 tv players on another machine).
VR meant we had to maintain a constant frame rate (60 or 90 depending on platforms). We used stereoscopic rendering, offloaded graphics work to a special job system. We used custom shaders (the game is like a graphical novel so outline shaded characters) we have spherical fog, lightmaps, FXAA, colour post processing etc.
Online multiplayer meant a packet system, ability to establish connections, matchmake, a system for making parts of the game world communicate, handling so many error cases, etc.
For variety of platforms meant lots of variety on the rendering, controller input etc.
For Switch it meant the ability to play on Switches close to each other on a different protocol to online multiplayer.
I shudder to think how much time and effort this would have been without Unity. I suspect we would have needed several new hires working on platform specific tech, full time network engineers, at least one full time graphics dev, at least one full time audio dev, one full time physics dev, the list goes on. Instead we had 3 programmers (which includes me where my time was heavily comprised being a founder/MD/Tech Director/coffee maker) and whilst the other programmers were very good they had both only graduated a few years prior.
Did Unity solve everything? Absolutely not. We hit loads of huge problems with Unity. Without help of their engineers some problems we would never have been able to solve. We helped Unity fix lots of issues at their end. We found issues that could have been solved trivially without Unity. We felt the strain of waiting days for an answer to a mission critical Unity issue. But in the grand scheme, the pain was less than 10% of what we would have experienced doing it with our own engine.
My big worry was not doing "tech" anymore, but that simply isn't true. But instead of having to write loads of architecture and code to even be able to write the "real" tech, instead you can write the more interesting stuff. For shaders you just write the shaders, not the system for passing in shader constants and setting up vertex streams. Post effects is similar. Coming from a strong engine/Tech background has been massively helpful, whilst unity trained hires are amazing it has been really useful for our studio for me to be able to get into the lower level to add feature, fix stuff, debug stuff, etc.
Needless to say, this improvement is much welcomed!
Plus there are performance concerns. I remember one graduate introducing a c++ bit field class and tried to replace some core functionality with it and killed performance. Developers prefer to debug non optimized builds, and non optimized builds can end up running slow when you replace simple one liners with classes and inline methods that don't get optimized in debug builds.
[1]I hope this doesn't sound aggressive as it really isn't intended to. It is just everyone is so used to seeing bitwise operations it is as straight forwards as reading "set the third bit" or "toggle the last bit" when we see the C code.
In the c/c++ game code bases I have worked on, it is very common to have statuses stored as a uint with each bit representing something and very common to set, unset, toggle, reverse bits etc.
I actually read the first part of the article thinking these aren't hacks these are just things people use day in day out. But the later section about setting last 0 or 1 bit etc suddenly because things I wouldn't typically see in the wild.