HNHacker News
TopNewBestAskShowJobs

jdswain

389 karma · joined May 5, 2011

Remote Software Architect.

[ my public key: https://keybase.io/jds; my proof: https://keybase.io/jds/sigs/JuHXXIhuefdZjpeFytCS4YvxdoIa6SnkDjV3wcoAB9c ]

submissionscomments
jdswain··on } // good to go
I made the move from Java to C++ at one point in my career. I'd actually programmed C++ before Java, but it had changed so much it was almost like starting again. The language itself is not that hard to pick up, but at the time I kind of found the memory management aspect daunting. It wasn't as bad as I'd made it out to be in my head though.

I've always learnt from books, and there are a lot of good C++ books. Reading a few of them and then some practical experience, maybe with a side project, should be the best way to get started, especially as you are already an experienced programmer. That's what I'd do anyway.

Make sure you choose modern C++ books as the language has evolved a lot, and you don't want to be learning outdated ways of doing things.

The library code is another thing that is quite different to the Java world, there are many good frameworks, but they all tend to manage memory differently, have different conventions, and sometimes even have different string implementations. That's just a fact of the C++ world, but it is getting better all the time.

Also, I started out using http://pocoproject.org/, and that gave me a lot of examples on how to do things well, it suited me as it matched my view of good OO programming, but there are a lot of opinions on that one too.

jdswain··on The Programmable Typewriter
It's not quite that simple. Saleae wrote desktop software, which is an important part of the product. By reusing the USB VID/PID I'm guessing (I've not looked at a knockoffs) that the knockoffs allow you to use Saleae's software, so you're basically stealing the software to use with your cheap hardware device.

The price difference does seem at the extreme end, but it's a lot easier to copy than to create. Saleae are doing a lot more work on product design, software development, marketing, advertising, SolidWorks licenses and all the other things that the knockoffs don't need to do. In the end if Saleae can't make a profit competing against the knockoffs then there'll be nothing to copy and no software to steal and then the knockoffs will cease to exist too.

Plus they seem to be really good guys, who have worked on this for years and really do a good job.

jdswain··on 68 Katy – 68000 Linux on a Solderless Breadboard
Looking back it does appear that Intel did nearly everything right, and their competitors didn't. It did help a lot though getting the IBM PC business, and due to that, aligning with Microsoft. If you look at the 68000 machines at the time they all had flaws that prevented them from really taking off, often not things that couldn't be corrected, but things that held them back. The Mac didn't have a hard disk, or multitasking, or color. The Amiga would always be constrained by the custom chips and that would be a problem long term, plus Commodore wasn't investing enough in software. Atari had a good simple product, and GEM wasn't too bad, but they didn't develop it further either. And the workstation market was constrained, as said by the parent, by the lack of a decent MMU solution. And then RISC came along too. In an alternative universe maybe the 68000 machines could have joined forces around a common unix platform and built a major market, but that didn't happen here.
jdswain··on Z80 Symbos OS now has networking support on MSX
The 68000 really took over from the 6502, even though it was completely incompatible. There is a 16-bit 6502, called the 65816, from WDC. They are still in production today and were used in some very high volume applications, like the SuperNES game console, but only really in the Apple IIgs personal computer. By the time the 65816 came out the 68000 was well established both in workstations and in the Atari ST, Commodore Amiga, and the Macintosh. The 68000 family had a long life and competed quite well against x86 for a while.
jdswain··on Stripe enters Asia with Japan beta launch
I think I've managed to find a workaround for New Zealand. Stripe is in Australia and it is possible for a NZ company to open a bank account in Australia so this should work. It's not ideal as it does add some bank fees, but it appears to be a viable solution.
jdswain··on “Hello World” in assembly language on Linux
ARM version:

    .data                                                                                       
    msg: .ascii "Hello, World!\n"                                                               
    len = . - msg                                                                               
                                                                                    
    .text                                                                                       
    .global _start                                                                              
                                                                                            
    _start:                                                                                     
      mov     r0, #1                /* fd 1 = stdout */                                         
      ldr     r1, =msg              /* message */                                               
      ldr     r2, =len              /* length of message */                                     
      mov     r7, $4                /* write */                                                 
      swi     #0                    /* syscall */                                               
                                                                                            
      mov     r0, $0                /* status */                                                
      mov     r7, $1                /* exit */                                                  
      swi     #0                    /* syscall */
I couldn't get the # style comments to work, so had to resort to /* */ instead. It's very similar because the code is quite simple, but could be a good starting point if you are interested in ARM assembly. You can use the same commands as above to build and run.
jdswain··on Designed by Yves Behar, Edyn (YC W14) Gives Plant Recommendations and Tips
I do see your point. Probably from a gardeners point of view this is not really important, I'm maybe biased a bit in that I'd look for a product with good design, that looked like the people cared about what they built, rather than something that looked like it was built to minimise cost.

The article was in wired though, and that's the kind of readership that maybe will care about the company and the people behind the product. It's one of the traps that a lot of startups fall into though, that a lot of their messages seem targeted at the startup community rather than at their actual customers.

jdswain··on Designed by Yves Behar, Edyn (YC W14) Gives Plant Recommendations and Tips
In the case of startups this adds a lot of credibility. Yves Behar has designed some really well known products, and fuseproject is (from what I have read) almost like an incubator for hardware projects with great design. So for a small startup to have Yves Behar working with them is a big thing and well worth mentioning. I'd certainly love to have the chance to work with him.
jdswain··on Porting Emacs to Chromebooks and the Web [pdf]
Normally I wouldn't question the usefulness of a project, but I'm having trouble seeing why this would be worthwhile.

Emacs already runs natively on every operating system for which Chrome also runs, so the portability aspect is not so important. And most of the time you would want to have a shell and even a compiler, so the sandboxing is kind of a problem.

I guess a sandboxed emacs is kind of a strange thing to think about. The trouble with emacs is that it brings in so many dependencies that you are getting dangerously close to replicating a full OS in a browser tab, but then you might as well just use a normal operating system (or a VM).

The idea of a Chromebook that I can run emacs on is really appealing, so much so that I did just that, but used Crouton. I thought I'd mainly be ssh'ing into a server, but actually have done a lot of stuff locally. Chromebooks make a really nice laptop if you can work completely in the shell and browser. It's all very simple.

I could see a use for this for having org-mode available in a browser, that would be useful, but it's a lot of work to go to just for that.

jdswain··on “Today we moved into our new Facebook building”
I once was working for a UK govt department as a contractor and was between tasks with nothing to do. The management thought it was easier to keep me on than to hire again when the work increased, so I was there with nothing to do. My manager and everyone around me knew I had nothing to do, but I still found it quite stressful doing things like reading Slashdot while at work (it was a long time ago). In the end I started my own project using the work development tools so it looked like I was working as normal, but after a while that was also too much so I found another contract.

I do agree about extra stress in open plan workspaces. I'm the kind of person that can't block out people around me like I notice some other people do, so everyone that walks past my desk I feel the need to glance up at them. In coffee shops I prefer the seating with my back to the wall. Music can be used to block out some of that distraction, but not all of it.

jdswain··on Apple Is Now More Than Double the Size of Exxon–And Everyone Else
We used to say that about Microsoft.
jdswain··on Inside GOV.UK: chaos and nightmare as trendy Cabinet Office wrecked govt web
I applied for a passport online, which all went well at the time, but yesterday I got a letter from them saying that I didn't fill out all the information (on a web form?). Included with the letter was a paper application form which, as far as I can tell, I need to fill out completely, basically starting again. And it's kind of difficult as I've sent all the original documentation with the first application so I don't have all the details at hand.
jdswain··on Inside GOV.UK: chaos and nightmare as trendy Cabinet Office wrecked govt web
I was looking at that Contact Us page yesterday. 126 items and I couldn't find the one that I needed, and there's no general number to call as far as I could see. Had to scroll through all 126 items and still didn't find anything that was relevant.
jdswain··on Apple's original business plan
"Inventing the personal computer" is something that is completely open to interpretation. I've heard Woz say something similar, and if you look at it a certain way then it's easy to agree with him. What he means by that is that the Apple ][ was the first computer that came with everything so you could plug it in and start work. The Altair and other's that people may consider as contenders for the first personal computer required more technical skills, like not coming with a keyboard, or requiring you to do a certain amount of assembly. So by one definition the Apple ][ was the first computer that you could buy, plug together and boot up Basic or VisiCalc and start doing some work.

At least with the first Apple ][, Woz designed the whole of the hardware, the ROM, and the first Basic. Later on that Basic was replaced with Microsoft Basic, which caused problems for Apple later on with the Macintosh when it came time to renew the MS Basic license. Steve Jobs did have some influence on the Apple ][, but far less than Woz, he worked on the PCB layout (as far as making it nice and everything line up, not the actual routing), and the case design (designed by Jerry Manock), which was revolutionary at the time. The switch-mode power supply was also unique in a computer at that time, and was not designed by Woz, but by Rod Holt. Woz's disk controller is probably the most impressive piece of design from that period though.

It was a very close thing though as the Commodore PET was actually released only a few months later, and was even more easy to set up as it came with a built in cassette drive and display. It's interesting that in most of this history Chuck Peddle, the designer of the PET, gets very little recognition, much less than he should. As well as designing the PET (which led on the the Commodore 64 and others), he was the main designer of the 6502, the processor used in the Apple ][. There's also a story that he met Woz and helped him debug one of his 6502 designs.

jdswain··on Beginners' Guide to Linkers
Often times the reason for overloading keywords is the reluctance to introduce new keywords, as this can cause backward compatibility problems. Instead of adding a new keyword and possibly breaking existing code that may use that keyword as a variable name or a function name, an existing keyword that sort-of fits is used for the new feature.

While maintaining backward compatibility is good, this does make the language confusing. Static is probably one of the worst offenders, but I think that C++ especially has quite a few of these cases now.

jdswain··on How Microsoft Uses C++ to Deliver Office Applications Across Multiple Platforms
We do this as well, targeting Mac, Windows, Linux, iOS and Android with the same C++ core libs. It seemed to be the only way to target multiple platforms without a huge team. It's not all easy though, the work of maintaining the JNI bridge is large, even with most of the code being generated automatically, With the woeful state of native debugging on Android it may have been almost as easy to recode in Java, but maintaining two code bases would have been a real hassle, its hard enough keeping all the UI's in sync.
jdswain··on Compiler Design in C
I had this book at University. It made a good companion text to our main textbook, the dragon book. The dragon book covers a lot of ground, and is very interesting, but Holub's book is much more practical, with everything illustrated with real code examples (if my memory is correct). This was a big help when learning and made compilers a lot more fun. It's well worth reading.

It's interesting that most of the content is still just as relevant today. Coding styles change over time, and definitely the popularity of languages has changed, but the theory is still just as useful.

Off topic, but we had the 'International' edition of this book. Many publishers at the time did this, I'm not sure why. The explanation was that it was to make it more affordable for us, although the prices were still high. They were soft cover editions with plain covers (this book had a red cover with only the title and author, in white). The linked page is the first time I've seen the real cover. This is probably an early example of regional pricing, much like DVD region codes. They could charge more in USA and less in other territories I guess.

jdswain··on OS X Yosemite
Mountain Lion was crashing on my Retina MacBook Pro about every day, since I upgraded to Yosemite it hasn't crashed once. Only a single data point, but it appears to be a really stable release now.

I still have the impression that the GPU is struggling with the retina display though, I was just using a 4 year old MacBook Air and the display animations were smoother on it than on my rMBP. I do have it scaled up to the max resolution though, I think that makes the performance worse as the scaling is more complex.

jdswain··on CircuitMaker: a free PCB design tool powered by Altium
I guess it's too early to tell, but I'm hopeful that this will be good. We don't know what the in-app purchases will be, or the price for them, but a basic version of Altium for a low cost would be really nice. Personally I don't mind paying something for this, but I can't justify anywhere near the cost of full Altium for hobby projects. If I have to pay for a few features that's fine.
jdswain··on Ask HN: Why does the enterprise have such a strong affinity to Java?
Java 1.0 and 1.1 were mainly targeted at browser applets. Applets were maybe a bit before their time as the download speed was slow and there were issues with downloading the JVM. The JVM was a really big download for the time, with many users still on dialup or maybe slow DSL. You could never rely on which particular JVM the user had, and this was a cause of compatibility problems. At the time windows was almost completely dominant as an end user operating system. And as others have said Microsoft's embrace, extend, extinguish didn't help. Microsoft came out with a relatively decent IDE for java, but then started pushing a technology I think they called J/Direct that let you make windows system calls directly from Java, which was kind of useful, but also completely tied you in to windows.

The enterprise/server usage of Java really took off with JDK 1.2, AKA Java 2 Enterprise Edition. Sun and also IBM put a lot of effort into promoting this version of Java. It coincided with the dot-com boom, every company suddenly needed web applications, and Java was the best way to build them. All the popular programming books from O'Reilly and others were about various Java related technologies, and I guess all the good jobs were working in Java. IBM did a 'World Tour' promoting Java and even produced/produces their own Java runtime (based on Sun's version).

Windows was the standard desktop operating system in corporates, and it was a real advantage that developers could develop locally on windows and then deploy on a Sun/IBM/HP server.

Java application servers became a thing. Sun bought NetDynamics, one of the first application servers. Basically an application server gave you all the needed structure and plumbing to build your enterprise application, whereas often in earlier projects developers built this all from scratch.

Java was designed to make code reuse easier, libraries could be packaged into jars and due to the language's consistency it was easier to combine code from others than it is in languages like C/C++. A lot of the tools you needed to build internet apps were built first (or only) for Java. Things like crypto libraries, SOAP tools, XML, XSLT, all the new stuff at the time.

UML became a popular standard for design documentation at the same time too, and java was well suited to building UML based designs. UML came about by merging many of the leading OO design methodologies of the time to create one overall standard. It combined the methodologies of many of the leading OO proponents of the time, including Grady Booch, Ivar Jacobson, and James Rumbaugh. There were a number of good UML tools, starting with Rational Rose (purchased by IBM) that really suited designing enterprise systems and then realising them in Java. Java was useful here because of its consistent object-orientedness.

It was also accepted wisdom at the time that you could hire a team of average developers and they could produce decent Java code, you couldn't rely on the same result from C++ where there were many more ways to shoot yourself in the foot. It also helped that at the same time there were huge numbers of Indian developers entering the job market at reasonable pay rates.

Java quickly became the standard, using anything else was either risky due to lack of support, didn't have the libraries or tool support, or maybe didn't have a large enough base of skilled developers available. So Java was the safe choice.

jdswain··on Lattice's $24.99 FPGA Evaluation Kit
Looks like you could fit 1 J32 32-bit RISC CPU on there with a few gates to spare.
jdswain··on HipHop: A "Popcorn Time" for music
This kind of app appears to be prohibited in the YouTube terms of service https://developers.google.com/youtube/terms :

II. Prohibitions

Your API Client will not, and You will not encourage or create functionality for Your users or other third parties to:

8. separate, isolate, or modify the audio or video components of any YouTube audiovisual content made available through the YouTube API;

9. promote separately the audio or video components of any YouTube audiovisual content made available through the YouTube API;

So I can't imagine it lasting long.

jdswain··on Ask HN: What accounting software do you use?
We use xero and it's made accounting enjoyable for me, and usually I resent spending time on accounts. We needed something that would handle multiple currencies well and so far that has been no problem. Being web based really helps too, especially as you get multiple users with no hassle.
jdswain··on Tell HN: My Brother Died Last Week. His Death Will Not Be In Vain
A while ago I had a problem with anxiety and basically panic attacks. Back then I didn't know how to deal with this, so eventually when it got too much I asked for help. I went to a doctor and the first thing they asked about was suicide. I thought, well, I hadn't really considered that, but now that you mention it, it's probably something I should think about. I wasn't suicidal, so I guess it didn't matter, but it sure does make you think about it when everyone is asking you. Overall though I think it is better to ask about it, because you really do need to know. I've heard though that a lot of people that do commit suicide are good at hiding things from people, even their family may not be aware that something is wrong, so even asking that question is not sufficient. When I hear about people committing suicide, I often think why didn't anyone help them. Often the truth is that nobody was aware, that's sad in it's own way, but it does show that a lot of people can keep these things to themselves.

The next thing I felt about the suicide question was that it was a way of categorising people. If they considered suicide, then they need immediate help, otherwise it's no so important, so offer them some pills, refer them to counselling (which was offered to me with a 4 month waiting list, that was not a lot of help). The pills weren't what I needed anyway, so I didn't really get a lot out of going to see the doctor. Talking to your family about it is a really important step though.

jdswain··on Richard Lynch, an awesome PHP community guy and former colleague needs our help
In my experience the location matters. I sprained my ankle in Edinburgh once, and the hospital visit was almost enjoyable. The staff were great. Where I live in London, it's not so great. They have to deal with a lot of annoying drunks and are overworked, but also the place was just not very clean. Our local A&E is closing down too.
jdswain··on Understanding how killall works using strace
Never done this myself, but have done worse really. I was working at Sun a long time ago and we had a big shared development server. Being familiar with linux killall I suggested to my boss that he use killall instead of killing processes one by one. So he tried it out. Whole team had to wait quite a while for the server to restart. :-)
jdswain··on Five Hundred and Seven Mechanical Movements
You probably have one of these if you have a printer. It's basically the same mechanism as on the output paper guides, that causes a movement of the guide on one side to match the other side, and for the paper path to therefore remain centred.

Normally you can take the output tray off and turn it over to see the mechanism.

jdswain··on Ask HN: Educating a child who is severely behind
It's a great thing that you are doing, making a positive impact on someones life is something you don't often get a chance to do. I think you'll be surprised how quickly infants do pick things up, but everyone learns at a different rate, so don't worry if he's behind in some things, there's plenty of time to catch up.

I think one of the best things you can do is talk with him, kids pick up language really easily, and it's a great way to learn. Spend time talking more as equals than as parent/child. It's sometimes a difficult balance to get, you need to have authority at times, but at other times it's better to be a friend.

Socalising with other kids is also important. So while putting in daycare may seem like you are avoiding taking care of him, it's really important for his development that he interacts with friends his own age.

Kids (and I guess anyone) can be remarkably sensitive too, so make sure he feels safe at home and has some stability. Talk about this too as sometimes kids get thoughts in their heads that would be better talked about than left for them to dwell on.

And don't worry about things to much, everyone learns this one on the job, you seem to care a lot, so I'm sure you'll do fine. And have fun with him, kids are a great way to relax (sometimes), and also an excuse to do things you wouldn't normally do.

jdswain··on Google Revenues Sheltered in No-Tax Bermuda Soar to $10 Billion
There is a lot of science in economics, but where it becomes unscientific is when humans are involved. Much early macroeconomics made the simplifying assumption that humans made rational decisions, and that they had perfect information when making these decisions. That is useful for some models, but the real world is much more complex than that, and that is why the models often don't reflect reality. There is a lot of science in economics though.

If the business tax rate is different to the individual tax rate then this creates some distortions, but more importantly there is the issue of double taxation. In New Zealand dividends/drawings are treated as tax paid, i.e. the business has already paid tax on this income, so no further tax is due. In UK, and I think USA, the individual would be taxed again, hence there is a double taxation on business profits, which does seem kind of unfair.

jdswain··on Ask HN: Freelancer? Seeking freelancer? (November 2012)
SEEKING FREELANCER - Remote is fine, we're based in London, UK and New Zealand.

We need someone to build a windows version of one of our applications. We already have the core code ported (it's in C++), we just need a user interface on top, most likely built with C#.

Development and testing will require some specialised hardware, but we can ship that to you.

jason@1av.com

← PreviousPage 6 of 7Next →