Better HN
topnewbestaskshowjobs
Log inSign up

flexd

650 karma · joined Jun 13, 2010 (16y ago) · 320 submissions

Embedded Software Developer http://github.com/flexd
Submissions

comment 11y ago · link · parent

I am quite new to Go, but I have been happily using this for a few months on a personal project. I really recommend looking at https://github.com/jmoiron/sqlx which is a library extending database/sql to simplify going from query->struct/slice and it also allows for named parameters and prepared statements.

#go-nuts on Freenode is a great place :-)

comment 12y ago · link · parent

While it may not look like it, in my opinion the uwsgi project desperately needs documentation help.

http://uwsgi-docs.readthedocs.org/en/latest/

There is just an endless list of features, and no clear red thread as to what you actually need to get going.

It's hard because it just supports everything for some reason.

comment 12y ago · link · parent

That's it, I am an idiot today. (and more days probably)

comment 12y ago · link · parent

I see this in zsh 5.0.0 on Ubuntu, and on OSX as well! zsh 5.0.2 (x86_64-apple-darwin13.0)

comment 12y ago · link · parent

You are right, but it makes a bigger difference than you suspect. My bike has a 2x10 setup right now, and I am most likely converting that to 1x10 or paying up for a 1x11 setup in the future.

Not having to choose between 1-2 on the front and then the back gears simplifies things greatly. In addition you also save some weight, it's a much simpler mechanic with less maintenance and with a newer SRAM Type2 or Shimano Shadow+ Clutch derailleur and a narrow-wide front ring you pretty much can't drop a chain, which is great. The only exception would be if you ride incredibly rough terrain where you bounce a lot, but a very simple chainguide fixes that problem.

comment 12y ago · link · parent

At the world cup finals in Hafjell, Norway last weekend, the top guys were hitting 82 kmh (51 mph~) on a open section speed trap. They aren't quite as fast in tighter sections, but still plenty fast.

Here is the helmet cam footage of Josh Bryceland that probably would have ended up winning if he had not overshot the last jump and broken his foot. https://www.youtube.com/watch?v=XBDpu4-pQhM The speedtrap is at about 2:30.

comment 12y ago · link · parent

Do not forget about suspension technology.

A mid-range fork today is so much better than a mid-range pogo-stick fork from the 90s.

Better forks & shocks as well as a slacker headtube-angle on most bikes today make todays bike a lot better to handle and ride, and inspire a lot more confidence than a bike from the 90s.

I do agree prices are high, but you do not have to have a $10k carbon bike to have fun or win races.

comment 12y ago · link · parent

Look for end of the season sales, or better yet, know someone that works for a supplier or store that can get you a decent discount. Mountain bikes are insanely expensive, but for local stores there mostly isn't a big profit margin (at least not here, Norway). The manufacturers themselves probably have a lot better profit margins, but I do not know enough to say anything about it. At this point, any "known-brand" mountain bike over or around $2000 new is a really solid bike that will work great and last a long time if taken care of properly. Above that you start to see carbon frames, higher end gruppos and mostly weight savings.

For example a bike with a Shimano SLX groupset is basically as good as one with the XT groupset (one step up), the XTR groupset is lighter and costs way more.

the Shimano SLX groupset is comparable to SRAM's X9 groupset in performance and price.

Getting into the sport I would go for a hardtail (no rear suspension) first. They are a lot cheaper, and you will get more bike for the money. Spend $2000 on a hardtail and you have a really great and light bike with a near top-end groupset, but if you spend $2000 on a full-suspension bike you will get less bike for the money, and a hardtail is good for beginners anyway. When you do not have rear suspension you have to learn how to keep your weight on the bike and how to pick the best lines down, and a full-suspension bike is a lot more forgiving that way. I can ride down stuff on my FS bike I'd never dream of doing on my hardtail.

comment 12y ago · link · parent

I do kind of get a kick out of that, but at the same time I also just want a safe system for storing data. If I end up building something like this I will take a look at FreeNAS! Thanks!

comment 12y ago · link · parent

By 'something like this' I meant pretty much what you just said: Would you do it the same way (your own everything) if you needed a much smaller system, or would you go with something like FreeNAS, like you suggested? I am confident I c an get it working good either way, but I would rather not spend half my days having to tweak and worry about stuff working correctly. I understand that it will need maintenance and monitoring of course, but I would much rather be more of a end-user having a working system than being the sysadmin that has to fix it all the time. :-)

Thanks for the link, I will take a look there.

comment 12y ago · link · parent

Would you recommend building something like this for a much smaller system? 10TiB or so maybe, I do not need that much, or do you think buying a NAS of some kind would be better?

I kind of want to set something like this up while spending the least amount of money. I am comfortable enough with Debian/Linux to do most things, but I have never managed anything like this. In the end I want to end up with somewhere relatively safe to store data pretty much in the same way you are, I just do not need 70TiB, and I have no experience with ZFS/hardware stuff/storage.

comment 12y ago · link · parent

I completely agree that mass surveillance is and will be a problem, and drones like that might very well be a part of the problem in the future.

But the 'drone' in this case did not do anything. It is a remote controlled vehicle, and it did not do any thinking, the operator did.

The title implies the drone was the key element in finding him, and not the person controlling the drone. I agree that drones will make surveillance easier, but until they fly autonomously without human control then it is a much smaller problem.

Using drones to find missing people is a good usage case though, and I like that.

comment 12y ago · link · parent

A more appropriate and less sensationalist title would be "Man on holiday uses his remote controlled quad-copter to search for missing man", or "Man with remote controlled helicopter got lucky, found missing man after just 20 minutes because he searched in the right place".

The 'drone' is not the news here, he could have been flying around in a helicopter, if he looked in the same place he would have found him.

comment 12y ago · link · parent

An alternative to this is RoboBrowse [1] which is also based on requests + BeautifulSoup4 and seems a lot more mature.

[1] http://robobrowser.readthedocs.org/en/latest/readme.html

comment 12y ago · link · parent

I agree completely, you sound exactly like the kind of person I am!

I just finished my computer engineering bachelors degree a month ago, I am 26 years old. From all the people I know at school, only a small handful of them has ever done any kind of coding or any thing outside of the school curriculum (more than just reading a tutorial one night).

That is, for me at least, a frightening thought. You want to work has a developer but you do not spend any time outside work to learn?

Some of us are curious and try things out. I believe those that do are (mostly) the people that can be good developers. A situation that was particularly curious to me was when we had our first Programming 101 (Java) class the semester before Christmas, and then when the second class from around mid-February. In between that time, a huge amount of the class did not look at any Java, or do anything, or even try it out. So unsurprisingly, barely anyone remembered anything. There was just a complete lack of interest, and I can't figure out why they would choose this career path if they did not enjoy it and I do not understand how those people managed to pass classes, or how they are supposed to do good work later.

I have had a growing interest in computers since I was a child, and I think I have been coding since I was around 12-13 years old. During my time at university I have attempted to get people more interested in coding by suggesting they figure out some problem they want to solve, and then spend some time making something. I think I managed to get only a few of them to try anything, while the rest were questioning why they would want to do anything like that... I know quite a few of them have gotten jobs directly out of school, but I have no idea how.

Edit:

I do understand that not everyone has time to nerd out all the time, especially when you get older and have a family. I also like to relax and recharge, so I try to keep busy doing other things like exercising. Sometimes I just get so sick of work, school and everything that I can't seem to write any code at home for personal projects. It is nice to be able to burn of that unspent energy mountain biking for example. And sometimes that just seems to shake loose a solution to a problem I have been having or give me inspiration to create something new.

comment 12y ago · link · parent

http://open.gl is a fantastic resource.

comment 12y ago · link · parent

How much are you paying for that on Hostgator?

comment 12y ago · link · parent

I remember reading that FB saw each link as a different link, but I somehow managed to forget that while writing the comment. Oops.

comment 12y ago · link · parent

I'm kind of wondering why they need so many different servers to fetch the file from the remote host.

It would be smart to at implement rate-limiting, and also delegate to a specific server close to the host to fetch the image, and then sync the image/file across their own networks to whatever server needs it.

It is just a huge waste of bandwidth that 100+ servers need to fetch the file, instead of Facebook itself absorbing the cost.

comment 12y ago · link · parent

I was watching Notch coding his christmas santa game in Dart/WebGL the last time, that was fun.

If you try to keep up with what he/the streamer is writing in your own editor you can get a better feeling of how certain things work.

It's like a nice interactive workshop where you get no help and it's hard to keep up.

comment 12y ago · link · parent

I use nginx, which is a great alternative to Apache.

I've never tried it on OSX, but this guide seems to cover dnsmasq + nginx virtualhosts :-)

http://zaiste.net/2013/03/serving_apps_locally_with_nginx_an...

comment 12y ago · link · parent

I would like to be notified too. Spendy seems like a great app for keeping track of what you have spent while traveling. :-) @flexd on Twitter.

comment 12y ago · link · parent

I've never actually used conky. I'd never see it, I rarely notice my wallpaper because I never see my desktop.

comment 12y ago · link · parent

That is true, charts are nice.

I actually mostly use glances [1]. I forgot to mention glances in my comment.

[1] https://pypi.python.org/pypi/Glances

comment 12y ago · link · parent

I like it, but why not use something like htop? [1]

Perhaps it's not entirely comparable, but you do not need to open any extra ports or run any extra processes.

It looks really nice though! [1] https://en.wikipedia.org/wiki/Htop

comment 12y ago · link · parent

Scrapy mentioned here is really easy, or as the article mentions a combination of requests, lxml and something like phantomjs if there is javascript involved makes scraping sites in python a nice experience.

I have briefly made something with Scrapy to scrape my university's websites to notify me when we get new exam results [1], and that was okay. I might be slightly abusing scrapy but it was an okay experience.

Previously I have used 'scrubyt' for Ruby to scrape things, but their homepage seems to lead to a skin-related website now. What tools/libraries do you use for scraping stuff with Ruby these days? I remember Mechanize and Nokogiri was good/decent, but it's been more than a few years since I last used Ruby.

[1] https://github.com/flexd/studweb (description in Norwegian but it's not important)

comment 12y ago · link · parent

Have you tried denyhosts?

I've always been installing denyhosts but I have not compared the two.

comment 12y ago · link · parent

It's just a nicer interface to iptables. Instead of changing my iptables config file you can do things like 'sudo ufw allow 22' or 'sudo ufw allow http' for example.

You should still understand iptables but you do not need to config everything manually.

comment 12y ago · link · parent

I'd like a copy of that playbook too :-), publish it somewhere?

comment 12y ago · link · parent

Use OBS http://obsproject.com/ (Open Broadcaster Software) and stream to a website like justin.tv/twitch.tv.

It's also possible to save to a file, so it's easy to do screen capture for anything else too.

12345
11