HNHacker News
TopNewBestAskShowJobs

HardyLeung

1,758 karma · joined September 5, 2010

Hardy Leung is the creator of Tagxedo (http://www.tagxedo.com) Twitter: @tagxedo
submissionscomments
HardyLeung··on Android Ported to C#
I think both of you are right. To each his own. I have a few applications that are algorithmically complicated and it is impossible (or very expensive) to implement multiple versions of the same thing on different platforms. Even though the core stuff is say 60% of the codebase (vs 40% in UI), say measuring in number of lines, the benefit of doing the 60% in a single productive platform is very very important. I'm talking about correctness, maintainability, consistency between different versions, etc. The remaining 40% UI code can be ugly, platform-dependent, inconsistent, etc, and it won't bother me as much. After all, an error in the presentation is far less lethal than an error in the core logic. In this case, a common platform is strongly favored.

That said, indeed many apps are not like that. Going forward though, I would conjecture that there will be more and more sophisticated apps.

HardyLeung··on Android Ported to C#
Your objective C code in iOS can directly call your C++ code. Your C++ code just need to be renamed with extension .mm.
HardyLeung··on Android Ported to C#
You are right that details are not out. What I said was purely conjecture on the part of WP8. However, given the roadmap, rumors, hints, discussions, the kind of people in charge (Sinofsky, known .Net hater), etc... I am pretty sure that WP8 will be like W8 in many regard. There were already some rumors (+ non-denial from MS) that WP8 may not run WP7.5 code so this seems a strong indication that it will be more like W8.

And that's not a bad thing. I love C#/.Net (one of my projects, Tagxedo, was built with Silverlight), but given Microsoft doesn't have even the slightess will to push it, we may as well move on, or find some way to ride Mono. C++ is currently on my mind since it covers all ground (sans UI, which you still have to do anyway), probably in a way more straight-forward than Mono.

HardyLeung··on Android Ported to C#
WP8 and Windows 8 are definitely very C++ friendly. I actually think that C++ may be the language to rule them all as the next generation of web application goes beyond what Javascript can handle. Well, that and C# given Miguel's effort.

I can develop ONE piece of core logic, and have it run on iOS, Android, Windows, Mac, even web (via NativeClient). I posted an AskHN about this earlier today (though not much interest). That sounds like a win.

HardyLeung··on Ask HN: How to teach my young children to program?
I don't like that book. I tried it with my kid (almost 8). The first 3 chapters are okay, but then chapter 4 goes into the discussion about floating points, integer vs. doubles, integer-to-double conversion, arithmetic precision etc.

I'd say what the heck? I want to introduce the concept of variables, control flow, for/while loops, etc. I didn't expect that he has to jump through those unnecessary concepts to get to the basic.

Granted, the book was written with good intention (father "co-wrote" the book with the kid while trying to teach him programming), but I thought the book turned into something else that IMHO is not very good. Perhaps this book is geared towards older kids, but I think kids (and certainly adults) that are any older than 8 would have been bored to death by its very slow pacing.

I may try Learning Python the hard way... still looking at it.

HardyLeung··on The Average Font
That's right, if I recall correctly. You can't copyright a font. You can rip off an existing font and create a new one that looks strikingly similar, even visually identical. However, if you do that by reverse-engineering the font (e.g. extract the bezier curve out of the TTF) then it is illegal. There is a court case where Adobe (?) sued some ripoff (and won), with the argument that while you cannot copyright the font, the "program" that implements the font is still copyrightable. IANAL and my wordings and details may not be 100% correct, so please feel free to correct me.

On the other hand, I wonder... if I take an existing font. Print it to a very high resolution PNG (not vector graphic so all Bezier curves are lost), and use some font creation software that recreate the font by doing an approximation... whether this is still consider a copyright infringement. Just curious...

HardyLeung··on The Average Font
Usually the topic of fair use is rather subjective, and even the four guidelines (roughly: is it transformative? what's the nature of the work, is it for-profit or not? how much of the original is used?) are subject to interpretation. This, however, looks like a strong case of fair use.
HardyLeung··on My employer asked me to sign this "Invention Assignment" doc, should I?
A caveat here...

Say you carve out prior inventions, existing knowledge, exception to non-competing projects, etc. You think you're safe... BUT you ask your employer to reimburse your high-speed internet connection. All of a sudden, they can argue that you are using company resources (though off-hours) and therefore even if the project does not overlap, it's the company's IP. Same thing with using your (company-paid-for) iPhone to do testing, business negotiation, etc. I may sound paranoid and I don't know where to draw the line. I think everyone ought to be careful about this sort of things.

HardyLeung··on Field programmable gate array that's 4.2x faster than a 16 core CPU
The article mentioned AutoESL, which compiles C, C++, or SystemC to Verilog/VHDL. This allows you to focus on the algorithmic, or behaviorial level. The advantages are plenty, but the main drawback is that it is one more level abstracted away from the hardware..
HardyLeung··on Ask HN: Please be more thoughtful when downvoting
I was actually about to suggest something similar, and in fact the number I was thinking is 20%. You are right -- it ought to cost something to downvote, but not so much that it discourages downvote completely.

It may be a bit complicated to implement the follow-up adjustment of karma, so I'm not too strong on that.

HardyLeung··on Ask HN: Please be more thoughtful when downvoting
This is sadly so true. It's hard to play devil's advocate sometimes because unless you are going for the "conventional wisdom" some people are bound to disagree with you, and disagreement is often expressed in the form of downvotes. Since offering a different point of view is discouraged, the discussion inevitably trends towards being bland or rah-rah in nature.

What to do? The wise solution is to just ignore Karma -- who cares about that except for the egomaniacs? But the truth is that we are all human, and when I offer something that adds to the discussion but got downvoted to oblivion in return, it hurts, at least sometimes. And in those cases when I couldn't care less, I feel a little bit wiser.

HardyLeung··on Fun with convex polygons
"I’ve seen a lot of people go through and calculate the area of a polygon by breaking it up into separate triangles, carefully calculating the area of each, then sum and halve."

I doubt anyone do that. What was described seems a lot more work compared to searching the web for the right formula/algorithm/source-code -- at least in the modern days. A very minimal amount of research will reveal this algorithm mentioned by the author.

That said, it certainly is a very nice algorithm.

HardyLeung··on 16-year-old Makes Working Scientific Calculator in Minecraft
Since you call me out, I need to point out that you are wrong. I do understand what it takes to do that, and that he needs to handle every bit and memory and all. You're passing a judgment based on a shallow interpretation of what others wrote.

And I said I am very very (doubly) impressed. When it comes to the freaking next project, branch off, do something else, don't constrain yourself in the Minecraft world. Instead, this kid should use his immense talent/patience/creativity that he/she has and applies to something more substantial. That's what I said. I don't understand why I got downvoted for saying that. You see it as a criticism; But what I gave was a constructive criticism. If you don't see it, pay more attention to the words "very very impressed" and especially the word "next".

HardyLeung··on 16-year-old Makes Working Scientific Calculator in Minecraft
This is very very impressive, though I hope the kid's next project is some creative and useful applications rather than another Minecraft undertaking.
HardyLeung··on Judea Pearl, big brain behind AI, wins Turing Award (Nobel Prize in Computing)
Congrats to Professor Judea Pearl! Though I did not take any of his classes when I was at UCLA, in chance encounters he gave me a very good impression - nice, intelligent, and unassuming. I ended up using a lot of his materials (Bayesian analysis) after college in my projects... Here's a Tagxedo I made of today's announcement in the shape of UCLA's logo: http://daily.tagxedo.com/march-15-uclas-judea-pearl-named-20...
HardyLeung··on Diablo III coming May 15
Very tempted, but I resisted!
HardyLeung··on Need name approval from community
I don't like either.

Flekko sounds like Blekko (easy to get confused). And what the heck does Flekko mean anyway? Don't just use cute-sounding word, but meaningfully cute-sounding word.

Amusly... I know where you are coming from, but this sounds like a gross grammar throwup. I feel irritated just seeing the word because it is wrong in spelling (why isn't it amusely?), grammar (amuse doesn't go with ly), and sound (rhyme with must or muse?). It just feels wrong. Not just wrong, but three wrongs. If you must use this... use Amusely. At least it is less disgusting-looking.

I am sorry I don't like either names. Hope you don't mind the very direct feedback. If I must choose, I choose Flekko.

HardyLeung··on Posterous acquired by Twitter
Perhaps Twitter wants to own all things micro-blogging (that's the term Twitter's Chinese competitor uses), whatever that means.
HardyLeung··on Show HN: Polygonian - Paint a Picture with Translucent Polygons (HTML5)
Link:

http://www.polygonian.com

Movies:

http://www.polygonian.com/app?art=wyIRUOCp&action=movie

http://www.polygonian.com/app?art=gbBrDhDR&action=movie

More artworks:

http://www.polygonian.com/app?art=T96dxr30

http://www.polygonian.com/app?art=67CTUqHy

http://www.polygonian.com/app?art=jq8AdtV2

http://www.polygonian.com/app?art=qtHBFncK

http://www.polygonian.com/app?art=1TSkyDga

HardyLeung··on Why you should never, EVER use linked-lists in your code
The article has some good points about cache locality, but to suggest that you should never, EVER use linked-list is just terrible, terrible, terrible advice.
HardyLeung··on StackOverflow
Joel, I think you have the right product and are sincere about this, but I believe Greg Young, the author of the article, brought up a few good points. I read the article and one analogy quickly came to my mind. EE was like AltaVista/Lycos/Infoseek, and Stack Overflow is like the younger version of Google.

+ The latter is clearly superior in technology (or content) to the other.

+ The latter makes user happy by giving them real value, whereas the former focused on milking the users for revenue.

+ The latter made promises to the users (Google: "don't be evil", SO: "contents are the community's property") and the users liked it.

+ Last but not least, "the competition is only a click away" (Google). "You can start a SO competitor in a heartbeat" (SO).

So far so good. But guess what happened to Google? They got good. They got big. They were no longer satisifed with being the king of search. They started Plus. They started saying "If you don't want people to know what you do, you shouldn't do that anyway". They now want your data to be shared among their properties and you cannot opt out. They got jealous of Apple. They got freaked out by Facebook.

I don't doubt Google started with a conscience, and a genuine focus to build a better search engine. They succeeded. Wildly. But except for the most hard-core Google believers, I doubt that many people still trust their "Don't be evil" mantra in its absolute. Frankly, do people even say that with a straight face outside of comparison with Microsoft?

I love SO and believe in the integrity of Joel and Jeff and others. You guys really rock. But time will change. Tide will change. A tidepool that is fun for little kids could become a fatal trap the very next day (sadly, this happens often). So please keep the warning in mind.

HardyLeung··on HNers: Please give us a new name
Go with names that are not that tricky to remember.

FoodBuddy

EatWithMe!

ShallWeLunch?

LunchYet?

Nom Nom Nom

HardyLeung··on [dead]
Diwup, perhaps you want to take down your published hack ASAP. Just because Instagram did not obfuscate their code, doesn't mean that it is legal to take it as if you are granted permission. You may get into a lot of trouble for this.
HardyLeung··on CoffeePhysics: A JS/CS Physics Engine
I think you need to revisit your understand of complexity. It is O(N^2). If you want the exact count, it is N(N-1)/2. N! is an exceedingly large number even for very small N.
HardyLeung··on CoffeePhysics: A JS/CS Physics Engine
You mean N^2, not N!
HardyLeung··on Gumroad Gets $1.1 Million To Turn Any Link Into A Payment System
Two suggestions:

(1) Provide a trial mode where I can sell stuff (like real) for $0, so I can validate the whole experience.

(2) Provide an API where I can create new sellable objects dynamically and programmatically.

HardyLeung··on Gumroad Gets $1.1 Million To Turn Any Link Into A Payment System
Congratulations! I remember it very well when I saw your post on HN. At that time I thought this is such a simple problem and simple solution that is ... hmm... bound to be successful! Just like pen.io which was just as simple, but if you think about it, why does it have to be difficult? I'll sure look forward to using your service.
HardyLeung··on Ask HN: How do you generate images from text?
You can draw the text into HTML5 Canvas and then convert that to an image (toDataURL).
HardyLeung··on HP open sources Enyo javascript framework from webOS, now cross platform
From the source:

When are the UI widgets coming to Enyo 2?

It is the very next thing we are working on, and we hope to have it out in about a month. We’ll update you with regular builds as work progresses, now that Enyo is an open source project.

HardyLeung··on Google shutting down Picnik
For this particular simple task, I recommend Pixlr. It was no where as polished as Picnik, but it is fast to load.
← PreviousPage 2 of 8Next →