HNHacker News
TopNewBestAskShowJobs

scraft

613 karma · joined June 24, 2015

submissionscomments
scraft··on Eigenquestions: The Art of Framing Problems
Perhaps this helps you http://gamesdev.com/temp/Screenshot_20200712_140535_org.mozi... views okay for me, not sure if the image size will cause issues for you.
scraft··on Cleaning My MacBook After 16800 Hours of Use
I have an Early 2011 MBP which I stopped using precisely because it couldn't get Mojave and therefore couldn't run the latest Xcode and therefore couldn't build for iOS 13. When I searched it sounded like any hacked upgrades would leave the graphics in a pretty poor state and it sounded like it just wouldn't be worth it. So I am curious on your results?
scraft··on Show HN: A Firefox add-on to strip Google search results of 'blacklisted' URLs
The two issues I have with Google search recent: first, I often get results, when searching for something technical which look like they have huge potential, a sentence with my search terms in, amongst a technical looking paragraph, with a URL, at first glance, that looks good, I click on it and it attempts to take over the browser with spam, redirects etc, I then realize the domain had random characters before the end, but I wonder how such terrible results end up on Google. I want to ban these sites from my searches. Secondly, unrelated to this extension, recently, Google have started popping up a box with other search terms I may be interested in, just after the search loads, within the search results, and the amount of times I have gone to click, only to be last minute intercepted by a link in this box which suddenly appears is unreal. Anyone else get that?
scraft··on What's the smallest country that can fit everyone standing six feet apart?
To be fair, over here in the UK, we have MPH for roads, stones and pounds for peoples weight (kilograms are becoming more popular, in particular for the under 25s), feet and inches for peoples height (meters becoming more popular for under 25s). So we have a bit of a hybrid really, I am 36 so get a bit of both, but my parents need everything converted to "old money" as they call it, they can't imagine what 25cm length is, they would need it in feet and inches. It is less stubborn for them, more, "why bother"? They can get by as is and have other things to occupy their time than trying to work out what familiar distances and weights are using a different scaler. Given that roads are still imperial as are lots of other things (mattress sizes, timber sizes, etc) it isn't like if they switched to metric it would even fix anything useful.
scraft··on Httpserver.h: Single header library for writing non-blocking HTTP servers in C
Header only fixes the lack of build system/module system as part of the language. Some popular build systems include: make, cmake, Visual Studio, Xcode project. Each has a different format for specifying source/header/libraries - and even if you provide project files for all of the above, then what about the other 1,000 build systems?

Header only is nice and easy, dump file in the project, #include and your job is done.

scraft··on Tape still beats SSDs and hard drives when it comes to price per byte
We had a Ditto drive and a series of tapes, bought circa 1996. We used the software it came with on Windows to perform full back ups of the machine, cycling between a set of tapes (maybe 6). Backup would complete overnight. Never had to restore from it. It was a consumer friendly, easy to use product and cheap. My father was an accountant that ran his own practise, so needed to know his files were safe. That went from carbon copies into a second filing cabinet, to 5 1/4" floppies for groups of clients, to 3.5" floppies, to Ditto tapes to USB sticks to Microsoft Cloud storage (which sinks between laptop and PC). The oldest days of filing cabinets and floppies were easy, the middle days of Ditto and USB storage was more worrying, and the final days of cloud storage went back to being simple again. Now he is retired so none of it matters.

This was all donkeys years ago, so it is interesting to hear how things have changed.

scraft··on Ask HN: How comfortable do you feel using cloud-based password managers?
Keepass for me, on Android I access via finger/thumb print scanner and on desktop I use Firefox with master password enabled. Database stored in Dropbox which is synced to work, home and phone.

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).

scraft··on The PS1 Game Spongebob Squarepants: Supersponge Violates the GPL
I hate all this stuff, I wish Google just blocked all GPL code for me so I never had to see any of it. I have committed to many open source projects and have open soured my own projects. Of course I appreciate anyone is free to use what ever license they like but I do find is frustrating that a game (which is a complex piece of software taking lots of development time) gets picked apart because of a string formatting function, which should really have been available in the system libs, but as it wasn't a quick replacement was grabbed, with a small amount of extra time I suspect a replacement could have been found which wasn't GPL. But due to the lack of care, understanding, appreciation, someone could get their meathooks into the developer/publisher and cause harm. The software didn't sell because of this stupid function, the stupid function almost certainly existed, GPL free in many places, the GPL version had no value at all over any other version, yet where the developer cut and pasted from can have such catastrophic consequences. If it makes no difference to the end binary I feel like a dev should just be able to find or write an alternative and say you are right, that slipped through, sorry, we have now replaced it in our code tree with this version, it makes 0 difference to the end product, so building and shipping a new version would make no difference, simply making this change in our source tree effectively resolves the issue.
scraft··on Betrayed by an app she had never heard of
For me, the benefits of Truecaller outweigh the negatives. It was a step towards my phone being useable again for the purpose of making and receiving calls (at times I seem to get flurries of spam calls so it is great being able to simple ignore).

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.

scraft··on Burger King is rolling out meatless Impossible Whoppers nationwide
I see this getting said a lot but I really don't find this, I mean there are loads of standalone fantastic vegetable products which are nothing to do with meat and taste great but No Chick Fillets (in a Jalfrezi) have confused dinner guests who thought they were eating chicken until I told them they were vegan, or No Bull Mince (in a bolognese), Beyond Meat burgers have been well received (although I personally don't find them as nice as burgers which I can still recall from before coming vegetarian).

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.

scraft··on Katie Bouman, the computer scientist behind the first black hole image
I am glad she got credit and I am glad in that respect she got treated equally. I am a little sad that her gender is a 'thing', as in I think I have seen more comments on various news site comments, social media, etc. that are quick to specifically point out she is a woman. I get they are trying to be positive, but it also has this weird reverse side where it is like "An amazing feat in STEM has been achieved, but you better brace yourself, it wasn't done by a man, it was done by a woman! A real living woman!". I understand the argument of needing to make a shout about it to help encourage more women into the field and to try to push against previous years of women not being in the limelight for work like this. But at the same point, every time it is specifically called out, it feels like something that is (obviously) only done for a woman, so therefore it is treating the achievement differently than if a man had achieved it.

Damned if you do and damned if you don't.

Anyway, I do not want to sidetrack from this amazing achievement.

scraft··on Sweden Wants to Revive Europe’s Overnight Trains
I have visited every country in the EU, a lot of which by train, it has been a thing my friends and I have done over the last 10 years, going to a few countries each year, trying to use public transport where it is reasonable. Along the way, I have been on a number of overnight trains and a number of overnight ferries and I personally highly rate the experience. There is something almost romantic about falling asleep one place and waking up somewhere else. But also the social aspect, head down to the bar cart on the train, have a beer, chat to other people, most people are a lot more open to chating than normal and you find out about their life, their reason for travel and sometimes even end up seeing them once you arrive at your destination. On top of that, planes are typically really noisy (from the engine), cramped, and just difficult (okay, business class is a fair bit better and I can only assume 1st class even more so) where as the train is quiet and just a nice way to relax either on the way back from somewhere on to build the excitement when heading somewhere!

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!

scraft··on Flickr Album Sorter

  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).

scraft··on Show HN: Discover what locals eat all around the world
And what about the Finnish breakfast? Coffee, cigarette and vodka?

https://imgur.com/gallery/tNwTM7e

scraft··on Linus Torvalds on Why ARM Won't Win the Server Space
Not disagreeing, but answering the question of are all phones ARM: no, there Intel too. Source: had to add Intel build support for our Android SKUs to run on said phones. Some Unity stats from about 6 months ago indicated:

    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.
scraft··on The shady economics of ‘buy one, get one free’ deals
Buying the right BOGOF items saves money. For instance, after spending a lot of time trying different options, I now know exactly what face soap I want and I also know the price it sales for. From time to time, it'll be sold as a BOGOF, so providing the price makes sense (i.e. it is the normal price or less than 200% of the normal price) then it is a good buy (it has long shelf life, and will always be used).

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.

scraft··on Skype contact lists may have been exposed (2017)
I have used Skype a lot for calling landlines and mobile phone numbers, in particular for people overseas where the phone bill would otherwise be high. I have also used this when I have zero phone reception but have access to Wifi.
scraft··on FaceTime bug lets you hear audio of person you are calling before they pick up
Possibly a product owner trying out the latest build, receiving a call, accepting it, and then waiting for the call initiator to receive the message that the call has been accepted, and then start sending data and asking:

"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.

scraft··on Blocking website ads with a hosts file
A good combination is uBlock Origin and Nano Defender (both correctly configured, there are steps you can follow online). uBlock Origin does a good job of blocking most stuff, and Nano Defender does a good job of stopping sites from detecting you have blocked their adverts, thus stopping the website from displaying a "Hey, you have an AdBlock, we need adverts to keep this site free. Disable your AdBlock and refresh to view this content".
scraft··on Why [Insert Thing Here] Is Not a Password Killer
I signed up for something recently and on the password screen it popped up with something along the lines of "Hey, can we generate a secure password for you, don't worry, your browser will remember it for you?" I said yes, sure enough a strong password appeared and Chrome offered to remember it. Seemed like a nice introduction to using secure passwords. The next thing I signed up for I manually generated a secure password and pasted it in and that is now stored in my browser too.
scraft··on You Can't Always Hash Pointers in C (2016)
Slightly related (but only slightly), on the PS2 (games console, from Sony) you could access main memory with three different pointers, cacheable, uncached accelerated and uncached (which was the same base address with different high bits set accordingly). Each mode had reasons to be used (for example, when you read/write to memory which is cacheable and then fire off a DMA transfer, the data being transferred may, and often won't, match, what has been set in the program, until a cache flush has been requested). As you can imagine, this regularly resulted in hard to track down bugs.

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 ;)

scraft··on Paradise Lost: How Tourists Are Destroying the Places They Love
Why bother traveling? Well I live in the UK and want to experience:

-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.

scraft··on Paradise Lost: How Tourists Are Destroying the Places They Love
For me the fact there are 1 million pictures of that clock online is irrelevant. People follow others on Instagram either because they are interested in what the person does or they find the other places and pictures interesting which have been posted in the past and would like to see more.

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.

scraft··on Sadly, I must say goodbye to Leaf, my programming language
Yes, but not unusual, as well as Unity we have similar blocks from MS, Sony, Oculus, Nintendo.

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).

scraft··on Sadly, I must say goodbye to Leaf, my programming language
I started our my games development career as a low level programmer and moved to a lead programmer in the technology department and then founded a games studio where we wrote our own engine and released several games.

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.

scraft··on C++ Just My Code Stepping in Visual Studio
It is funny how long this has been an issue and how I and so many people have given up stepping in and instead jump to the actual user function, set break point, and then step over at the source location, then unset the breakpoint and continue. A bunch of crazy steps which you end up doing again and again.

Needless to say, this improvement is much welcomed!

scraft··on Ask HN: What are the things that you have automated in your personal life?
I wonder, if you accepted a little delay, say 20 seconds, could you use Shazam to identify what song is currently playing? I have been amazed at the range of music Shazam can identify, if you could do regularly queries and separately listen out for gaps in music, it seems plausible to be able to identify when a non-song (from Shazam's perspective) is playing.
scraft··on Low Level Bit Hacks You Absolutely Must Know
As daemin says, no, I am used to working with people that find basic bit field manipulation easy to work with[1], so there isn't any confusion.

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.

scraft··on Low Level Bit Hacks You Absolutely Must Know
In the computer games industry, or at least at the companies I have worked in based in the UK, these would be part of a test given either remotely or immediately on arrival and failing to answer correctly would make it unlikely to proceed any further.

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.

scraft··on Programming in the Debugger
Again there is no need for black and white. Take each case as it comes. Often edit and continue is enough sometimes you do need to stop and restart to be sure. Sometimes you are 99% sure and that is enough when you have 4 weeks of bugs and 1 week to ship a product. Heck sometimes you are trying to repro a complex but and half way through hit and unrelated issue, I make a sound of pain and someone else asks what's up, I tell them, they say it is fixed in latest, but I can edit and continue a fix now to save having to spend ages reproing. There are loads of times the feature is useful. I would suggest the people finding it amateur and not useful aren't using it correctly or at sensible times.
← PreviousPage 2 of 4Next →