HNHacker News
TopNewBestAskShowJobs

scraft

613 karma · joined June 24, 2015

submissionscomments
scraft··on Google, please fix Android's slow, bloated share UI
Yes 100%. It is shocking how long it can take to bting up the share dialog and no indication of progress so you can end up clicking again and that click then gets passed to the share dialog when it finally comes up and starts sharing somewhere completely inappropriately.

Sometimes I leave it for several seconds, no share dialog, so press it again, but low and behold it was just taking a really long time. Othertimes I wait and wait and wait and eventually conclude it isn't coming up after all.

After years of training you get better at sharing, very firm clear tap on share and then wait 10 seconds. But then someone else uses my phone and I tell them to share it for me and it goes horribly wrong and they can't quite believe how bad it is, just as I get used to it.

Currently on a Samsung Galaxy S6 but I have had this issue on all Android phones.

The order thing is insane, I wondered if this was all just my phone, maybe a rogue app or bad firmware update, so relieving to hear this happens to others.

scraft··on Programming in the Debugger
Sometimes I look at the bug database, pick up the next highest priority bug, have zero idea what the problem may be, sometimes there isn't any screenshots and the description is worded so poorly it is hard to make sense of. So I follow the repro steps, which perhaps take 15 minutes and trigger the issue.

After that I may pause execution and examine some variables and work out what is wrong. From there I need to work out what has caused this to go wrong, perhaps a hardware breakpoint and reloading part of the scene will help.

From doing that may be I see what triggers the hardware breakpoint, a for loop not ending correctly or taking too long to end.

With edit and continue it maybe possible to make the fix, trigger the function again and close the bug. Without it may require a compile, link and the 15 minutes of repro steps.

So edit and continue can massively cut down the amount of time required to fix a bug.

It seems really weird it would be described as amateur or not professional. As usual I suspect it is part of the trend of making everything black and white rather than looking at things on a case by case basis.

Sure if some maths needs to be solved to fix a collision bug when the use is drawing a line on the screen, I would work out the maths and make sure the function is right. But if the maths is right or I don't know what is causing the issue, edit and continue is just another tool for fast and efficient debugging.

In my opinion...

scraft··on Want airline food? Take Amtrak
I used to go to a business conference every year in SF (I am from the UK). Also, in the summer a few friends and I would regularly take 9/10 days off and rail around Europe, seeing new cities, exploring and having fun.

A few years ago, I had a bit of holiday available, so took it straight after the conference in SF to travel from SF to New York (with the most part of the Zephr train).

I explained what I was doing to one American at the conference and he couldn't get his head around it. "But you can fly" and "but it is cheaper to fly" and "but you can get their faster by flying". I explained I wanted to be on the train, unwinding, watching America move past my window, speak to all sorts of people. Go to sleep in one state and wake up in another. After a long chat, the American was happy to leave me be.

The next day I am talking to someone at the conference and the American from yesterday turns up, I do a little nod and wave to acknowledge him, but he comes over and interrupts. He is with 5 other Americans and says to them "this is the British guy I was talking to you about!" and I had to explain to more people what I am doing and why. It was then like a snow ball effect for the rest of the conference.

I spoke to so many Americans that had never been on a train, which seemed just as bizarre to me as I seemed to them.

Anyway, the Zephr ride was amazing, there was a drought and heat wave in California and Chicago was in -15°C freezing temperatures. I saw the land scale change from sky scrapers to empty space, climbed up and around the Sierra Nevadas, went through your after hour of flat farm land and so the outside change from sun to snow. I spoke to so many people from devout Christians from the South, to a train driver/operator (who told us when the driver wasn't doing as well as he could and explained how various parts of the train work), to a retired couple who are travel regularly to see their kids, to college students to military men.

In the observatory carriage you get an amazing view of the country going by and sometimes have guides come on board to give you some history and information about the area. This was supplemented by eager locals who told me even more and pointed out wildlife as we travelled.

I slept brilliantly in my bed each night and enjoyed nice food three times a day. It was like being on a package holiday where you eat too much, drink too much and sleep too much. Needless to say I really enjoyed it and have been on a few more similar journeys in the US since (but the Zephr was the best).

When I arrived in New York I was only there one night but that was fine for me, I was more interested in the train ride.

After a tiring week at the conference, the train ride was such a breath of fresh air, a chance to decompress and relax, being forced to do nothing except enjoy the surroundings, have a few days off from appointments, to dos, worries and stress.

I have been to quite a few American cities, but felt I got a better sense of what America is from taking that train ride.

scraft··on What Did Ancient Romans Do Without Toilet Paper?
I am from the UK, typically visit the US once or twice per year, have visited every country in the EU and am currently spending 12 months traveling the world (3 months in at the moment, having visited India, Hong Kong, Vietnam, Cambodia, Laos and Thailand). I have a website/blog about this for those that are interested: http://ourbigplanet.com

In various parts of the world, previous to this trip, I encountered trash cans (or bins as we call them) in bathrooms for toilet tissue (Turkey is an example). I also encountered "bum guns" (the hoses with a sort of shower head that you can fire at yourself after bowl movements). What I typically did was ignore both and continue my business the way I knew how.

Since starting this year long trip, I have been forcing myself to try more things. And all the countries I have visited so far have requested toilet paper isn't flushed and they have the bum gun. So I tried it, and shockingly found it works really well. No matter how bad the movement is (eating street food, often heavily spiced, etc) the bum gun does a splendid job of completely cleaning you, and you don't have to get your hands particularly close to the zone you are cleaning. It is far less abrasive, environmentally better, and leaves you cleaner (it is like if you have a muddy arm, and attempt to clean it by wiping it with tissues vs having a shower).

After using the bum gun, typically I will use a couple of sheets of toilet paper, initially to make sure I was clean, but I so found this wasn't necessary, but I still use a couple just to get dry. Sometimes there isn't any available, and I don't have any, so I leave the bathroom with a slight amount of wetness which quickly dries in the hot countries.

The toilet paper goes into the bin, but unlike in Turkey where it was used toilet paper (used without bum gunning) which stunk the whole room out, now the toilet paper is inoffensive and without smell).

So overall, I feel the way things are done over here have a lot of positives. I am certainly glad I embraced it.

On a tangent, I believe people who wipe typically do it one of two ways:

1. Whilst sitting on the toilet, do some sort of lean and wipe manoeuvre

2. Stand up, squat a tiny bit and wipe.

I have been taught to do 2 as a child, but find some toilets aren't designed for this, as they have a sensor which flushes when you stand (even if you are standing to wipe). I find these sensors are much more common in the US than other places I have visited. It is almost like the designer doesn't know about all the people who use method 2.

scraft··on Apple Plans to Use Its Own Chips in Macs from 2020, Replacing Intel
Just become a professional games developer, then you are forced to use Windows (for example to develop for Xbox One). The nice thing is: you can then say, 100%, Windows is the right tool for the job, and you can ignore the people claiming Linux or MacOS are better.

I have worked at three games development studios, some of the biggest in Europe and every single developer machine runs Windows.

scraft··on Avoid Else, Return Early (2013)
I think the real transcendence is when you try out many different programming paradigms (all of which have loads of good reasons to use) and overtime find out the shortcomings of each. Then just pick the right tool for each use case.

The general information here I think is good and I roughly follow. I have also done almost the opposite and removed as much code outside of the hotpath as possible from the top of the function for performance reasons (guided on profiling). Also there can be times where you jump to a function to see what it does and can't actually see as all of the edge cases come first rather than the bread and butter.

Often you need to be careful when thinking a new paradigm is fixing a problem, like handling the err variable being passed in, and question why there is an err parameter at all. Where does it come from. What are you actually meant to do when it happens? Does every case always just log it, or throw it? Is the logic being performed at the right level? Etc. Sure the answer maybe yes everything is correct but there will be lots of times that the complexity just shouldn't be there.

Horses for courses.

scraft··on Stephen Hawking has died
You ignored what life presented you, And strived to achieve your goal. You took the time to share with us, The universe, big and small.

You reminded us what makes a man, Comes from deep inside. With your wicked sense of humour, And your persistence to survive.

We thank you for all that you did, And for all that you will do. You may no longer live amongst us, But we will still look up to you.

RIP Stephen Hawking, 1942-2018.

scraft··on Konva – HTML5 2d canvas library for desktop and mobile applications
I have used Phaser to make games using HTML5 + TypeScript. It was my first attempt of doing a browser game and I found it pretty decent to use.

https://phaser.io

I don't have the final build of the project I made with it publicly visible, but an older build:

https://total-tetris.herokuapp.com

Supports mobile (touch controls) and desktop (keyboard controls). Final version has Facebook leaderboards.

I had one or two issues with Phaser which I supplied fixes for which were merged.

If I made a similar project, I would check out latest alternatives but wouldn't hesitate to use Phaser again.

scraft··on Lessons for software developers from 1970s mainframe programming
Absolutely, 100%, should you optimise for your resources. In a lot of scenarios those resources aren't CPU, HD, memory and bandwidth, instead they are developers time. But certainly if computer hardware becomes more of a bottleneck (cost, time, etc) than man power, then optimising for hardware makes sense. Like most things in life, it isn't binary, and I believe most developers already embrace this, making compromises in order to meet deadlines, create maintainable and debugable code, writing code to help with tomorrows tasks, learn new techniques but attempting to apply new coding ideas that may help in future tasks, make code run optimally enough for the given scenario, etc.
scraft··on Stop Using Excel, Finance Chiefs Tell Staffs
All of the cases where I have seen Excel sheets get "out of control" are not because someone came along and decided to implement a complex system in Excel, far from it. I tend to see small, well suited, sheets being created in Excel, and then iteratively new features get added

"Wouldn't it be great to automatically get averages each month"

"Perhaps we could pull in exchange rates so we have up to date currency values"

"As we need to compare this to employees here, and because we actually have a list of employees in another sheet for holiday and sickness, why don't we put the employees into another separate sheet and cross reference it from both places"

"When we add a new employee wouldn't it be nice if these sheets automatically update"

"We want to pull in this live data every day at midnight, perhaps we can have an automated job for that"

Then when someone says "hmm, I don't think Excel is the right tool for the job" there is often general agreement, but at that point there are lots of interconnected sheets, formulas, external data being pulled in, cron jobs, etc. and the system manages a lot of different things, none of which you particularly want to be without and despite the complexities, people have been with it over iterations, so they are actually quite familiar with how it all works.

But then a couple of people with the knowledge leave, a new person takes over, and their first job is to remove Excel and come up with a much better system. They try, users complain it doesn't do certain things as well, over time in improves, somehow certain things never seem quite as good, but then new features have been added so people forget and find the next thing to complain about instead!

scraft··on “It is never a compiler error”
I have hit a number of C/C++ compiler bugs in GCC, MS VC, Code Warrior and various in other languages (for example shader compilers). I agree it is the sort of the last thing you blame, but at the same point, sometimes it really is, so I get a couple of sanity checks from skilled friends or colleagues, making a tiny repro, submit and move on!
scraft··on The fake Facebook profile industry
1. I got told many years ago, that when you get that crazily bad emails, where it claims to be from some official source, but there are spelling mistakes, the return email address is obviously wrong, grammer is terrible, etc. the sort where it is so completely obviously it is a scam - often this is done on purpose, they aren't intereseting >99% of people who can spot a scam, they are interested in the <1% who can't spot it is obviously a problem. Basically they cast a wide net, but when the haul it in, only the whales are found within. At that point, they can use a large amount of resource, per victim, as they know they have a reasonable chance of success.

2. Separately to the above, a reasonable amount of men (perhaps women to? I don't know, I feel like it is more men) will happily look at girls, whether this in a Playboy Magazine in the 50's, looking at girls as the enter a bar in the 90's or whether it is flicking through images of a girl on Facebook/Instagram in the 21st century. Some of these men actually know it is a scam, but don't really care, at the end of the day it's a picture of an attractive girl/woman, they so they look through. Maybe they even add that profile as a friend, as they don't mind having the pictures appearing naturally in their news feed. I don't know whether many (any?) of this group of people end up getting scammed. Perhaps somehow overtime, they get convinced the account isn't fake, or perhaps they still think it is fake but agree to go onto a video chat and then are convinced on there, or perhaps they are trying to catch the scammer out, but end up being caught out themselves.

scraft··on The two questions I ask every interviewer
The best interview I had (for a lead games programmer position) was a written test, I can't remember the exact details but perhaps 24 pages and 45 minutes to complete it. Before starting I flicked through the entire test to get a feel for what was being asked of me, and then for a little while debated just getting up and leaving the room. It felt a bit crazy, a test on all sorts of disciplines of games programming that I wasn't an expert in, and I didn't intend to become an expert in (and the job I was applying for didn't require me to be an expert in). But I calmed down, tackled the test in the best way I could, answered the questions in an order where my most confident answers (and quick to complete) answers were done first, then moving onto ones I had a pretty good idea of, then ones I knew less well, etc.

40 minutes in, the CEO of the company came in, it is a ~300 man company, so it was interested in itself that he came in. Anyway, he wanted to go through the test, I said I hadn't finished yet, and had made a note of the start time, and still had 5 minutes remaining. He said it doesn't matter, lets have a look. And he flicked through the test and didn't look at my answers and instead found a section of the test which I had completely ignored (it was to do with AI and path finding, both topics I have done almost nothing on during my entire education and career). Of course, this was the question he wanted me to answer, I explained the reasons I hadn't answered it, and said if they wanted me to do things like this it really wouldn't be a suitable job for me. But he persisted, stop worrying about all of these things, just answer the question now. Again I had that slight feeling of wanting to just leave, but again I overcame in.

I started talking him through the things I did know about the question, pointing out areas which could cause problems, then started listing what I could do to limit the question to avoid some of these issues (it had a picture of a top down level, the question was inside a box, I said lets initially forget about the box for example). Then I started just talking about an initial algorithm which could route AI around the level - I said it would obviously be really bad (basically AI just walking into things, then working out where to go next, and then a bit later saying oh I could keep track of where I have been in case I end up at the same point, etc.) we talked more about it, he asked some questions, and bit by bit I came up with a solution.

He said that's interesting, because during this process you have described parts of various algorithms which someone who has studied AI would know about, but you are going from a brute force perspective, not having any way points in the level, no extra level knowledge. I said I didn't realize I was allowed to do that, if I could do that, I could potentially come up with some nodes in the level, and rather than bumping into objects, go between nodes, work out the distance between nodes, build up a graph so you know the best way to get between points. Again he was happy, I was describing, or partially describing an actual solution. His next question was but how would I work out where to put the way point nodes, and again I just starting looking at the image, thinking about good positions for the way points, looking at the normals from each wall face, and started to see that putting way points as far away as possible from all normals had some advantages, and bit by bit came up with some sort of solution about how to do this.

By the end of it, there was a solution which involved preprocessing the level data offline, when the game runs using this data to move around the level, being able to handle paths becoming blocked (or new paths being opened), strategies for running this on a separate thread or CPU, asynchronous to the main game. It was demonstrating knowledge of the full pipeline for making a game from artist making levels to game running at 60Hz on a PC/console, and also taking into account human resource, i.e. we could do things this way, which would give us a slight edge, but it would make the designers life a lot harder, so I'd probably not do that, take the performance hit, which is small and can probably be won back by the level designerse having extra time to optimize anyway.

I was offered the job, ultimately I had a better offer elsewhere so I didn't take it, but for me the test made a lot of sense. My day to day job (Tech Director of a 12 man games development studio) is constantly having to solve problems which initially do not appear to have an answer. The ability to break down an issue, not panic, look from various different perspectives, build up a solution, have a good feeling for what parts of the solution are weak and need further research etc. to me makes a huge difference between an 'ok' programmer/developer and an exceptional one. I haven't used the same test approach, but have certainly learned a lot from it when hiring people, never trying to trick interviewees, quite the opposite, trying to give them as many options as possible, and just urging them show me how they would be able to deal with day to day issues and come out on top. I certainly worry that whilst I got through, some people really would have just walked out, and in some cases you could argue those people wouldn't work well when faced with tough problems and lots of pressure, but on the other hand, but outside of the testing environment they'd be fine. Anyway, I personally wouldn't want to create quite as much stress/pressure if I were to use these technique in future.

scraft··on How Unreal Renders a Frame
Whilst this is true for a lot of cases, it doesn't always hold true for companies which consistently release highly profitable games, an example of such company is Travellers Tales in the UK. With their volume sales, the royalties outweigh paying for an internal team to develop the engine (multiple times over). You can check vgchartz to get some idea of their game sales, and if you are particularly inclined, use companies houe to drill down to get the P&L (although you may need to spend some time getting through their company structure to find the actual P&L which has the right information).

But for a lot of companies, using an existing engine is a no-brainer - even more so when the developer has no idea how well their game is going to do, using something like Unreal effectively means they share the risk with you.

scraft··on On Living and Thinking in Two Languages at Once
As a somewhat beginner in French (basically no formal education, but completed the English -> French DuoLingo course and daily reader of childrens news in French from 1jour1acu.com) one thing that intrigues me is how much easier it is to say emotional things to a stranger another language, for example, saying "tu es très séduisant" to someone (you are very seductive/attractive) feels very easy/natural, where as saying similarly the same phrase in English, to someone from England, would feel hard for me to do. I'm not sure if that is partly because there is a sort of disconnect, or whether it is because you know there is a language barrier that absorbs any potential embarassment.
scraft··on Ask HN: What is your favourite way of unsubscribe from emails and why?
I use some of the unsubscribe options when the sender seems reputable, in other cases I am worried to use it, as perhaps they are just sending out emails to get a confirmation that the account is valid so they can then spam it all the more.

Our emails go via a host which provides a CPANEL interface, and from there I have a rule for all inboxes which I add to (for deleting spam), on average, once a week. There are probably a few hundred entries on the rule, but overtime it has worked very well. It normally takes me a few moments to add a new entry to the rule list, just because I try to be very careful to ensure I won't delete any important emails.

scraft··on Google Fires Employee Behind Controversial Diversity Memo
Hmm, when we made our first female hire (we are a computer games company), she was a graduate and I did point out that everyone else was male. We offered her the job. She accepted it. She mentioned whilst working she wished more girls worked here so she had someone to talk about girl related things with and go out shopping at lunchtime (it turned out one of the males here knew about shellac nails after this comment and they had a chat about it). Ultimately she moved onto a bigger company a year or so later (the male/female balance wasn't given as a reason, the new job was something excited her a lot more).

I think saying 'can you HANDLE being in a mostly male work environment' is not the right wording. But the decision I took to let a potential candidate know they would be working in an otherwise male only office, I would take again in the same circumstance - it WAS something she was interested to know and WAS something that also came up when she started the job.

I can't speak on behalf of any other women, or scenario in the world, the above is the account of what happened to us. We typically get at least 10X more male candidates to female, and we employ and the same ratio. For about half of the jobs we recruit for, the personal doing the interviewing is female.

scraft··on WanaCrypt0r Ransomworm
This is a good point I hadn't really considered - for the massive attacks typically there are pretty thorough write ups about exactly what it does, etc. so that maybe reassurances enough.
scraft··on Compiler Optimizations are Awesome
Is anyone else in games development here? If we are looking to run the game at 60 FPS, we have 16.67 ms per frame to do everything required to run the game. Because of this real time requirement, a decent amount of profiling is typically done on each game. I typically see that the frame time is getting split up over a whole array of different sections of the game, i.e.:

- Calculating skeleton animations (updating bone positions, sometimes skinning vertices too)

- Clipping geometry in the scene (finding out what things are inside/outside the camera frustum, etc.)

- Processing game logic, things like AI can be quite costly, so much is game dependent

- Walking through all the geometry that needs drawing and issueing draw calls

- Decompressing streaming audio and sending it to a sound driver buffer/queue

- Stepping the physics world (integrating positions/rotation working and resolving out intersections, etc.)

The difference between a non optimized, and an optimized build, is often 5 FPS and 60 FPS, and optimizing a single hot file or function would not get the game running anywhere near 60 FPS. I think the idea that optimizing compilers aren't required is completely laughable, but then again I only have one perspective from the games development scene - maybe someone else will reply and say they make AAA games in C/C++ and don't need compiler optimizations :)

scraft··on Pix2code: Generating Code from a GUI Screenshot
Interesting, wonder how it handles much more complex setups. I find a big part of taking a design from Photoshop and getting it running on iOS/Android is often more about thinking about what the constraints are, i.e. does an element sit at an absolute distance from a screen edge, does it sit a specific distance from another element, does it expand to fit an area, you obviously have to do this to ensure it works at different screen resolutions. These would certainly be hard decisions for AI to get right on a relatively complex screen, but then again, maybe with enough training it could actually do really well and solve these problems in a completely different way to how a human would. There is also stuff like considering whether any of the information is dynamic (text being received from a server) in which case elements needs to be able to adapt to different sizes etc. again hard for AI to have any clue from this from a photoshop image only.
scraft··on WanaCrypt0r Ransomworm
Hmm, I'd certainly consider it, most based on not wanting to deal with the consequences of formatting the machine and starting again (installing programs, set up various setting/configuration options, etc.)

I can't 100% say I would, but maybe.

scraft··on Ask HN: I have 50k. How do I make it more without a startup?
I got 'talked into' moving a chunk of money out of a current account into a combination of investment ISAs and Personal Investment Plans with Scottish Widows. Over 5 years they have increased in value by about 35%, so average 7% per year. Here is one of the ones I used:

http://webfund6.financialexpress.net/clientsv21/scottishwido...

I went in knowing nothing, and wouldn't have done it if my bank hadn't pushed me in that direction (the department of the bank no longer exists) and I guess I got lucky, as it has worked out well for me.

PLEASE NOTE: investment ISAs/Personal Investment Plans with Scottish Widows can go up and down. Also bear in mind I an openly saying I know next to nothing about this, so please don't jump into anything without researching it carefully.

scraft··on My CAD software called home, and no-one answered, so it shut down
WireShark and OllyDbg are the usual starting places for me, both have tutorials around for them. OllyDbg in particular has guides around for by passing serial numbers, etc.
scraft··on A scalper who used bots to buy millions of tickets, now wants to stop them
It isn't that I don't appreciate your point about a live VR concert being different, and right now if I simply put on a VR headset and was there (without any other tweaks at all) there would be a limit to how 'cool' it would be. That said, I'm a Radiohead fan, if they offered an option to go to a rare gig to see them play, in VR (either VR or nothing) I would certainly consider it. If you then said that VR technology is going to continue to improve, and I'll be able to sit there with my friends, watching the band, taking virtual photographcs of the band, optionally discussing the show with others, etc. maybe it starts to actually start getting quite interesting.
scraft··on A scalper who used bots to buy millions of tickets, now wants to stop them
Big artists, that have gigs where tickets cost the best part of $100 (I'm UK based and I'm converting what we'd pay for big name artists gigs from GBP to USD) are saying they have 10X the demand of people wanting to see them than the stadiums can take....

...wow that sounds like an awesome problem to solve! Like play 10 dates, or if that is too tiring, maybe they could let a lot of people watch live on VR headsets for a much cheaper rate (like $10 or something) - I am always hearing the global number of Gear VR sales is large and getting larger and larger.

I understand this problem is different to normal computer problems, but I'm used to it being the case that you don't need to worry too much about scalability - because if you are in the position that you do, you should have the resources to be able to find a nice way to solve it!

Maybe some sort of bitcoin/blockchain + verifiable ID, so on the door you can prove:

1. You are the person who paid the ticket 2. The price you paid for the ticket, is the price on the ticket

scraft··on Ask HN: What's your top growth strategy that helped grow your startup?
Employees
scraft··on Ask HN: What's your top growth strategy that helped grow your startup?
I'm not sure whether you'd count me: I went from 0 to 10 people in about 5 years (hardly massive growth), there was no secret, just a process of being conservative, slowly growing each year, attempting to full utilize all resources we have, and trying to bring in contracts which will support us both now and in the future.
scraft··on Ask HN: why Apple uses a hardware switch for iPhone's silent mode?
I think there is also a sense of trust, in terms of users worrying that they have clicked the right buttons in the UI to enable silent mode, if they get it wrong, a phone goes off at a very problematic time. With the hardware switch it is a very definite on/off silent mode.
scraft··on TINY: VNC for DOS
Although not the same, it brings back memories of having webcams facing TVs/monitors, which allowed people from multiple locations to view the output of programs they had written running on actual harware (where the hardware itself allowed code to be executed over the network, but didn't offer a remote display option).
scraft··on TINY: VNC for DOS
Well there is a lot to be confused about, in the above example, I should imagine the intention was to NOT include a blackslash before bar and baz (otherwise the end result is changing the directory to 'baz' on the root of the C drive, meaning the cd to \foo and \bar and redundant).
← PreviousPage 3 of 4Next →