HNHacker News
TopNewBestAskShowJobs

optforfon

392 karma · joined March 1, 2016

submissionscomments
optforfon··on A beginners guide to thinking in SQL
This is a very naiive and simple question:

I really love the idea of SQL and am looking for a project to use it. It seems like a great way to encapsulate most of the state of your program so you can make your code more decoupled. For crunching logs or other data-dumps it seems like a no brainier, but for everything else I don't really have a a sense for the performance characteristics. Like would it make sense to keep objects' data in an SQL table (like a pImpl) ? is going over the rows of SQL table instead of std::vectors a different order of magnitude performance wise (I assume with something like SQL-Lite I can keep the tables in memory and not on disk).

I guess when is it appropriate to use a database and when is it not?

EDIT:

For context - I'm working almost exclusively in C++ and am usually pretty performance sensitive. In my last job we did radar simulations with lot of entities (radar platforms, aircraft, ballistic missiles etc.) that just lived in STD containers. Decoupling state from the simulation was always a bit of a struggle. Would keeping something like that in an SQL database make sense?

Another example. At the moment I'm working on an art project and I need to keep track of vectors and polygons which will be later used by a ray tracer. I'd also like to keep the state decoupled from my program. Would a SQL database be a bottleneck?

optforfon··on Linux debugging tools I love
what's the advantage of using perf over valgrind? I've never really managed to get it working (it hooks into the kernel and inevitable some part of it fails for me) - but maybe I'm missing out on something?

I understand it probably handles mutithreading better and probably has a much better performance - but is that really it?

optforfon··on How a team of young people helped rebuild healthcare.gov (2015)
I'll give you that not everyone is productive at 12 hours - but I'm not talking about everyone or even averages. The point is there are plenty of counterexamples of people that can work 12 hours days for months and are way more productive than anyone working 8 (hence "rock stars"). Some people really really love programming and don't have a life outside of work. A simple example is the overzealous founder/cofounder programmer that works 12 hours a day. I've seen people do that and they are very very productive b/c their heart is in it. I imagine some people with lots of stock options and/or coolaid-drinking also are very productive. Some people I've met that work at SpaceX sound incredibly productive. They probably eventually burn out, but with turn over being so high in our industry as it is, your employer doesn't really care. You'll leave after a year or two anyways.

.. The link you put up is full of conjectures, but I didn't actually see any numbers... (it's a link to class? .. I don't even understand the website)

I'm thinking more in the vein of

https://en.wikipedia.org/wiki/Brooks%E2%80%99_law

"adding manpower to a late software project makes it later"

optforfon··on How a team of young people helped rebuild healthcare.gov (2015)
You might be fine,but I'd be ready to make a lot less money as we move into a more freelance oriented market

the problem is that labor doesn't scale very well. 2 talented young programmers working all-out 12 hours a day on one project will generally be more productive than 3 talented folks with family working all-out 8 hours a day. (Agile, git, etc. all try to fix this to a degree... ) The current economic situation is that startups have very very deep pockets and will pay an insane premium to have stuff ASAP - which will mean very small, very overworked, very talented "rock stars".

If you want to fix healthcare.gov and the president's reputation is on the line, you'll get the rockstarest rockstars you can find and slave drive them till it's done

If you want a good work life balance I recommend the defense sector - but again - expect a pay cut. (like $120K end of career in SoCal vs. $250K in SF)

optforfon··on Bushido: Way of Total Bullshit
(I got through about half the article) I think making the analogy to Christianity and chivalry is simply a way for Nitobe to communicate the way samurai were percieved and it seems a bit dramatic to lay it all at his feet as some kind of grand manipulative agenda.

The Meiji era (and the Taisho era after it) were times of a very bizarre "formalization" of japanese culture. Like other comments mention, things like karate, kendo, ekinaba, art of sword making, etc. etc. were all formalized and unified under one umbrella at this time. Before say "karate" you'd have different schools teaching different martial arts under different names around the country.

I actually don't have a very good grasp on why this happened

optforfon··on Why Fruits and Veggies Are So Cheap in Chinatown
The fruit in China, at least in the big cities, is pristine. Apples are individually wrapped, everything is generally impeccable. You can get cheaper beat-up fruit in some food stalls at a cheaper price if you want.
optforfon··on My God, it's full of yaks
oh, very interesting! I'm definitely going to look into this further. Thanks for the pointers
optforfon··on My God, it's full of yaks
I guess I understand why it has to make a new folder - it just seems that that would means you have to redirect (and relink) anything that uses a recompiled library. Okay, I'll definitely start to dive into this. I was asking around to see if it fits my workflow. thanks!
optforfon··on My God, it's full of yaks
I'm trying to read the docs and understand how nix works. It seems really fantastic but at the same time so radically different that it seems like it would collide with a lot of built in assumptions of Linux development.

For example, does nix play nice with CMake or config files? ie. I can just point them at the packages in /nix/ and it'll work?

Or for example, I often find myself wanting to have a few different version of OpenCV around (with different build flags) - but all version 3.0. Nix seems to make a new hash/folder when the dependencies change. Can you make make a new build/folder when the dependencies stay the same? (or specify to NOT make a new folder and to overwrite the previous compiled version - ex: you fix a bug)

I have a ton of overlapping dependencies between contracts and projects and this would be a cool tool to keep it all organized (right now in my workflow each project/contract would have it's own copy of OpenCV.. which is a bit of a mess)

(I'm totally cheering for this - hope it becomes mainstream, just wondering how "prime-time" is it)

optforfon··on Alan Kay on the misunderstanding of OOP (1998)
Sorry, I mean "drawbacks". One of the reoccurring complaints about OO is that it leads to huge codebases. Lots of articles about how X rewrote some Java program in Y and it's not 10x smaller and 100x more maintainable. This is a consequence of languages being designed to be minimal in terms of keywords - trying to push off as much as possible on to library writers. Unfortunately this seems to have serious limitations and all the boilerplate can't seem to be hidden in library wrappers
optforfon··on Alan Kay on the misunderstanding of OOP (1998)
Have you actually talked to educators about this?

I've asked a few why OO is the first thing you learn - and the reasoning was two fold:

1) People that start off by learn imperative programming end up writing really really shitty OO code. They're they type of people that end up copy and pasting stuff everywhere. It's really hard to get students to not take the "short cut" of copy paste to think in objects when you have homework deadlines and other things to worry about (and the teacher never actually spend time to teach you how to use programming toolchains...)

2) it's conceptually one of the biggest stumbling blocks for people. A lot of people have trouble wrapping their heads around OO. So sure you could teach it later, but it'll never sick or sink in.

optforfon··on UK votes to leave EU
That being said.. the fact that there are people in Brussels that probably spend hundreds if not thousands of man-hours figuring out what is butter and is not kinda illustrates what people don't like about the EU
optforfon··on Alan Kay on the misunderstanding of OOP (1998)
"For what its worth I consider object's simply as a basic level category of procedures and data tied to a namespace.“

I mean you're just using different words to talk about the same thing. In your terminology inheritance is just extending a namespace and overloading names.

How does that discredit or put into question the "mental model of command and control, or structured design concepts"

If anything I feel the failure of OO languages is that they have been afraid of baking in proven design patterns/principles that reoccur over and over (ie. Gang of Four and a few more since then). Yesterday i was staring at some undocumented OpenCV code trying to figure out why there was some pointer that kept showing up in random places. After a very confusing 30 minutes i figured out it was actually the pImpl idiom. Now why do we have to have to reimplement the pImpl idiom each time? why can't this be a keyword?. The amount of code bloat and confusion that a visitor introduces is the prime reason I never use them. (There was an interesting proposal at CppCon 2 years ago that addressed this, but as far as I know it's not gone anywhere)

The problem is that the most OO language trace back to C which IS a half-assed language from the perspective of "concurrency, state, and hell even the basics such as cyclic loops within a event based system" and most languages that do OO have been half baked on top of that foundation.

optforfon··on Los Angeles is suing a landlord for evicting tenants to rent units on Airbnb
Most families in SF either have been there for decades or do in fact make 150k/yr. It's not being rich - it's just the local standard. This is the mark of a successful city (even though in the process culturally a lot was lost unfortunately) There is a small section of the city that has crime. That pretty much goes for any large city - and it's tied very closely to the city's efforts to help disadvantaged people.

If SF really wanted to get rid of the homeless and crime they definitely could with some NIMBYism. They'd shut down all the low income housing and stop helping the disadvantaged and increase arrests.

Context: grew up in SF. don't live there anymore.. but i don't recent the changes to the city. Life moves on

optforfon··on Even Mark Zuckerberg puts tape over his webcam
I think when you're a person as important as Zuckerberg - it'd not be unreasonable to think you're under surveillance by other governments and so you probably can't easily guarantee that your hardware hasn't been tampered with.
optforfon··on A Third of Valve Is Now Working on VR
Since people are still figuring out what makes good VR and good paradigms for programming with VR, I think it'd be likely that any design by committee API would be a disaster
optforfon··on If ICANN only charges 18¢ per domain name, why am I paying $10? (2014)
wouldn't it make more sense to pay based on how much your site gets used then? Or would that be too expensive to track?
optforfon··on Home Depot Files Antitrust Lawsuit Against Visa, MasterCard
It's interesting how in China they kinda leapfrogged credit cards all together (they still exist, but they're not ubiquitous). Here it's either cash or payments through phones and QR codes using Alipay/Wechat/etc. It's pretty fantastic and there is very little lock in like b/c these aren't hardware-centric technologies. Just download an app, connect it to a bank account and you're good to go (both merchant and customer). So competitors are free to disrupt all they want.

Meanwhile parasites like Visa skim an insane 3% off of the whole US retail economy. How this isn't banned by the government is beyond me... I'm sure it rivals the sales tax in some jurisdictions.

optforfon··on Valve funding VR projects, exclusivity-free, with pre-paid Steam revenue
I think I understand the distinction you're making. However I think it's only technically correct. I understand that I can boot up a VM with Steam, download the game, copy it from the VM to my machine that doesn't their software and it'll probably work. But that's in the realm of "technically possible but completely impractical". In practical terms I actuality have to run their software on my machine to have access to the software I buy through them.
optforfon··on Valve funding VR projects, exclusivity-free, with pre-paid Steam revenue
How are logging in and installing someone's software even remotely similar?

I personally find Steam, buggy, ugly, intrusive and effectively spyware that is logging and tracking god knows what. I feel very uncomfortable installing it on my machines and in general having to go through software A to get to software B makes a lot of people uncomfortable.

By contrast, logging in confines the the website to tracking my activity on the website itself - which they probably can do with a cookie anyways...

optforfon··on Too Many Knobs
I think about:config is terrible. It's really hard to find anything in it. It's very "if you know its there you will use" but has no discoverability.

For instance I was wondering if I could have one tab connect over a VPN while the rest were over my normal connection. I have no idea if that's an options somewhere in the millions of toggles

EDIT: You know how applications used to be have an "Advanced" button that'd give you a nicely organized display off all the "extra" toggles? Whatever happened to that paradigm?

optforfon··on An Analysis of 155 Postmortems from Game Development [pdf]
I think you're talking about "first year of work" levels of experience. Estimation is hard - but a major goal of Agile development is to make it possible.

I thought the same thing as you, but a month ago someone explained it to me in a way that makes a lot of sense https://news.ycombinator.com/item?id=11641316

Actually a lot of the comments about this PDF can be summed up with "practice Agile development"

optforfon··on Facebook disabling messaging in its mobile web app to push people to Messenger
from what I understand, WhatsApp works in China and Messenger doesn't. So I doubt they'll merge. But it'd be nice if you could message from one to another
optforfon··on Facebook disabling messaging in its mobile web app to push people to Messenger
you can turn off the bubbles...
optforfon··on The Geneva Free Port is crammed with storage vaults that contain great art
It's worse than that, lots of art at good publicly owned institutions aren't easily available in high resolution. There aren't any really great central repositories for high resolution scans that are free to use.

I know in Moscow there is an interesting museum called the Pushkin museum which mostly consists of replicas of the worlds famous art. It was actually kinda enjoyable having for instance all the renaissance sculptures of note in one place

optforfon··on Boston Dynamics employees were frustrated by Google's plan for a household robot
I'm not correcting the guy's grammar for god's sake. I'm pointing out a subtle but serious prejudice and discrimination that is pervasive in our industry. But go on and cover your ears and pretend it's not happening
optforfon··on Boston Dynamics employees were frustrated by Google's plan for a household robot
Yeah and white people are worse than asians at math and blacks are more likely to rob your store

The fact that there are still people that don't understand discrimination in this day and age is infuriating. If you think your interview candidate is potentially senile then you should screen for senility and not lump people based on statistical averages for whatever pigeon holes your constructed for them. People need a chance to surpass whatever stereotypes you hold even if they're based on statistically facts.

Not only is it down right illegal, it what perpetuates discrimination and causes so many of our social problems

PS: I'm sorry this is off topic, but this is a very important issue - and simplistic narrow minded thinking like this needs to be pointed out for the common good

optforfon··on Boston Dynamics employees were frustrated by Google's plan for a household robot
ahh, good ol' ageism. At least you're straightforward and honest
optforfon··on A New Age of Animation
This has been completely under the radar but Korea has been very aggressively pushing it's culture for years. There are tons of funds available for people that study Korean history, the Korean language, and write books that positively portray Korea. It's all part of some very intense nationalism and a comically inflated sense of self importance

One particularly hilarious example is they managed to get some remote tribe in Indonesia to use their alphabet to write their language

https://en.wikipedia.org/wiki/Hangul#Dissemination

As far as I can tell Korea is definitely the new-cool in the rest of Asia. Japan is kinda seen as very last year/decade. All the trendy stuff is coming out of Korea. I wonder if Taiwan will ever be a cultural hub. They seem to have all the right ingredients

optforfon··on Japan adding mandatory programming education to all elementary schools
The lack of people to talk to is definitely the number one reason their English proficiency plunges after school/college, however in my rather limited experience their reading isn't great. Like you say they have decent vocabularies, but they really try to avoid actually reading English text.

I was working with some researchers for a couple of months and I was fascinated how they have their own world of scientific publications. You could be a totally competent scientists or engineer and not know a lick of English.

They'd really only go to English publications as a last resort, and people I'd guess weren't under a ton of pressure to publish in English either.

Since then I've actually noticed this is a trend in larger countries. There is some kind of critical mass of people which once reached makes them completely capable of living in a linguistic bubble. Mostly this is simply a question of how variety of media you have available to consume. Once it's high enough and you have the major western stuff dubbed, you can kinda cost with your local language. Compare something like Poland (where surprisingly few people speak English) and some place like Estonia (where everyone speaks English)

← PreviousPage 3 of 6Next →