Lua: Good, bad, and ugly parts - adamansky
http://notebook.kulchenko.com/programming/lua-good-different-bad-and-ugly-parts
======
graue
Lua's great. I recently used it to rewrite a small audio effect framework[1]
based on an older project of mine in C[2]. To my astonishment, without any
optimization efforts on my part, the LuaJIT version of one effect ran _faster_
than the C version, while another more complicated effect (a filter) only took
2.01x as much time as C. And this was with simple, clean, mostly declarative
code (read it on GitHub and see what you think).

One of the goals of this project was to compile effects code to JavaScript
with Lua.js[3] and produce a demo that ran in the browser. There,
unfortunately, I ran into a showstopper with a Lua.js bug[4] that breaks my
approach to creating modules. Unlike LuaJIT and regular Lua, Lua.js is an
experimental project and far less mature - though totally awesome. I might
make another attempt to fix the problem myself at some point. With a more
mature Lua.js, you could write fast Lua code and port it to nearly every
environment.

[1] <https://github.com/graue/luasynth>

[2] <https://github.com/graue/synth>

[3] <https://github.com/mherkender/lua.js>

[4]
[https://github.com/mherkender/lua.js/issues/13#issuecomment-...](https://github.com/mherkender/lua.js/issues/13#issuecomment-9220080)

~~~
azakai
I'm curious to do some performance comparisons, can you perhaps say how one
would build and run your code to replicate those benchmark results?
(Especially but not only the one you say was faster in LuaJIT?)

~~~
graue
I documented the tests on my project log:

<https://scott.mn/projects/luasynth.html#filter_effect>

In short, I ran C and Lua implementations of the same command, 6 times each,
using the built-in "time" command in bash. Averaged the "user" time for each
implementation and compared the results. As input, I used a 2m:38.040s long
song, 44.1 KHz stereo, converted to a raw file with 32-bit float samples, and
I redirected output to /dev/null.

For the first benchmark[1], which was faster for LuaJIT, I actually messed up:
I compared the "real" time rather than the user CPU time. But as I recall, the
"user" times bore the same relationship, and there was very little deviation
among the six trials. If you don't trust me, feel free to do a more rigorous
test!

It's worth mentioning that the effect for which LuaJIT beat C was a simple
gain, so what was really being tested was a loop that multiplied a bunch of
numbers by a (within the loop) constant. The second test in which Lua was a
factor of two slower may be more representative.

To build the code, clone the graue/synth and graue/luasynth repos on GitHub.
synth includes build instructions, while Luasynth merely requires you to
install LuaJIT and run the script.

[1]: <https://scott.mn/projects/luasynth.html#lua_beats_c>

~~~
azakai
Thanks!

------
ethereal
I've been using Lua in a project for quite some time, replacing Python as my
embedded scripting language of choice.

It never ceases to amaze me, as a language and as an interpreter. Sure, the
syntax bites you occasionally, and sure, the lack of built-in functionality is
occasionally annoying. But hey, I can add callbacks into a simulation engine
that execute 10 million times per second with almost no slowdown in the
result. Like the article mentions, the string matching library isn't as
powerful as Perl's, but it's more than adequate for all of my uses.

My only wish is for an updated LNUM patch that works with Lua 5.2. I deal with
integers too much in my projects for its absence to not be annoying.

~~~
justincormack
Looks like Lua 5.3 will have an integer type.

~~~
ominous_prime
Ooh, that would be really nice. Is there a roadmap anywhere, or is this
mailing list chatter?

~~~
fab13n
Roberto did a keynote at the Lua workshop '12, where he detailled what keeps
the Lua team busy. A video of it exists somewhere on the web. Half of it was
about how to integrate IEEE doubles and 64 bits ints soundly in the language.
There are some challenges left, but they're really trying to overcome them.

~~~
bsg75
<https://www.youtube.com/user/luaworkshop>

------
andrew-d
I recently started programming in Lua too - it's a fantastic language if you
want to embed it in anything, and using the LuaJIT FFI [0] makes interfacing
with C code from pure Lua a pleasure. I've also started writing a set of
extension libraries[1] that provide various "missing" features - mostly
inspired by Ruby.

[0]: <http://luajit.org/ext_ffi.html> [1]: <http://andrew-d.github.com/lua-
ext/>

------
peterfschaadt
It's very easy to extend Nginx with Lua [1] to create a custom Nginx setup for
fast API endpoint authentication, diverting beta users, or handling sockets.
I'm hoping to see Lua continue to grow and solve some of its shortcomings like
unicode support and pattern matching.

[1] <https://github.com/chaoslawful/lua-nginx-module>

------
shaneeb
Haven't used Lua much but the concept of _tables_ is really neat. Its simple,
orthogonal and the fact it lies at the core of many features in Lua (composite
data types, metaprogramming, etc) means those features are neat too.

~~~
FreezerburnV
I agree about the tables. Personally, I find Lua to just be a more honest
language, in a sense. Languages like Python or OCaml really just use tables
under the hood for objects and what not (from what I understand), but Lua
shows you that outright.

~~~
smosher
I can see the case for Python, but how do you explain OCaml?

------
saosebastiao
I'm sitting here wishing lua was the de facto web language. Javascript makes
me sad.

~~~
shaneeb
I guess if we could replace it with Lua we would still be sad. How do you
think Lua makes for a better language for web?

~~~
phaedryx
Compare

<https://www.google.com/search?q=javascript+wtf>

vs.

<https://www.google.com/search?q=lua+wtf>

~~~
shaneeb
If that was the measure, maybe we could use a language nobody knows because it
will pass this test with flying colors :)

~~~
shaneeb
Not implying that one language is better than the other, but how does Lua help
solve problems that web developers face? I say this because I have been
working on a "killer" web app (JS intensive) for the past few months and it
has been a real pain but I dont see how Lua could have helped either.

~~~
gruseom
A lot of people find coroutines easier to work with than callbacks, so there's
room for a Lua alternative to Node.js.

The way things are going, it looks like that alternative will also take
advantage of Lua's embeddability to allow interop between web apps and web
servers in a way that hasn't been widely practiced before.

~~~
Jare
> there's room for a Lua alternative to Node.js

Do you know Luvit? <http://luvit.io/>

~~~
gruseom
I've heard of it, but I'm unclear on the benefit. Can't you do async I/O in
Lua already? What's the value of adopting the Node.js model, which is mostly
about adding I/O to V8 and using callback functions for async, in Lua? (I hope
that doesn't sound trollish – I'm ignorant and would like to understand, and
the Luvit project page doesn't help.)

------
phaedryx
I've been looking for a way to introduce my children to programming.

I've been considering several different languages to start them on and Lua has
turned out to be a great choice. My children both love minecraft and we've
been writing programs in Lua for the computercraft mod:
<http://www.computercraft.info/>

~~~
NateLipscomb
I agree. I've been teaching my 7-year old son to code and Lua has been a great
choice for him so far. After having him play around with Scratch and learn
some javascript with Code Monster, we got him going with some game development
in Lua with the Corona SDK. It's proven to be pretty intuitive for him and
he's having a lot of fun. He was super stoked when we first put his "game" on
an iPad and play around with it. I'd definitely recommend it to other parents
looking for something to start their kids on.

------
greggman
Having never used a language that indexes from 1 I'd expect that would make a
ton of common math used in programming either break or be more complicated.

How is it in practice?

~~~
ominous_prime
I never found it to be a big deal, unless you're trying to copy algorithms
from another language nearly verbatim. There's not really any _math_ that
relies on 0 indexing,

~~~
greggman
I guess it depends on what you mean by "relies"

Using a single dimensional array as a 2 dimensional array relies on zero
indexing.

        index = y * width + x
        array[index]

Using modulo to covert an index back to 2 dimensions relies on 0 indexing

        x = index % width
        y = index / width

Skipping a prefix in a string.

        prefix = "ABC"
        string = "ABCdef"
        unprefixed = string[prefix.length:]

I'm sure there are tons of others. Yes, you can add 1 or subtract 1 in the
right places. That's the annoying part of it though.

~~~
rbehrends
Eh, for every use case where it's more convenient that arrays start at zero,
there's one where it's more convenient that arrays start at one, and vice
versa.

For example, to get a prefix of length 'n', you need characters 0 through n-1
with zero-based indexing and 1 through n with one-based indexing. (That Python
hides the -1 when using a [0:n] range is a convenience; the subtraction still
happens internally.)

Similarly, to get the last element of a one-based array with a[length(a)] and
the last element of a zero-based array with a[length(a)-1].

What it comes down to is that sometimes you have to write +1 or -1 for zero-
based indexing where you can avoid it for one-based indexing and vice versa.
What is not the case is that it only universally happens for one of those
schemes.

------
vor_
Here's an article I've submitted before that makes a case for considering
Squirrel instead of Lua:

[http://computerscomputing.wordpress.com/2013/02/18/lua-
and-s...](http://computerscomputing.wordpress.com/2013/02/18/lua-and-squirrel-
the-case-for-squirrel/)

The best reason against using Lua in my mind is that undefined variables in
Lua return nil, which can lead to typo bugs and therefore unintentional sparse
arrays, which screws up the result returned by the length operator. It also
has inconsistent boolean expression evaluation:

      while 0 do print("Loops forever") end
      while not 1 do print("Does nothing") end
      while 1 do print("Loops forever") end
      while not 0 do print("Does nothing") end

It's nice having real classes in Squirrel with type introspection and
corresponding C APIs. In Lua, I have to juggle metatables in the registry to
construct a class system, and my system will differ slightly from someone
else's. Squirrel's other niceties like compile-time constants, 0-based arrays,
and automatic reference counting for predictable memory management overhead
make it a quite nice alternative to Lua.

It sounds like I'm bashing Lua here, though I still find it fun to program
occasionally. But I do wonder how long Lua can remain as popular as it is with
an unconventional syntax, inconsistent behavior, and a minimal built-in
library in the face of richer alternatives like Squirrel, mruby, and even Tcl,
which has improved much in recent years. There must have been a reason Valve
Software chose to use Squirrel in L4D2 and Portal 2 instead of using Lua as
most apparently do.

~~~
vardump
It's not inconsistent at all. In Lua, only nil and false are not true.
Everything else is true, including all integer values, strings "0", "false",
"", etc.

I'd rather say Lua is one of the most _consistent_ and logical languages when
it comes to truth values. You don't ever have to worry about arbitrary value
evaluating to false.

<http://www.lua.org/pil/3.3.html>

~~~
vor_
Lua's treatment of boolean expression does lead to inconsistencies. For
example:

      function Func1() return 1; end
      function Func2() return true; end

      if(Func1() == Func2()) then
        print "They're both the same!"
      else
        print "They're different!"
      end

In Lua, even though 1 and true evaluate to true, they're not the same thing
and so comparisons between them evaluate to false!

~~~
graue
1 and 2 both evaluate to true, yet they're not the same thing, so the
comparison `1 == 2` is false. Is that equally problematic to you?

There's no way to avoid this problem in _any_ language that allows coercing a
number to a boolean. There are two possible boolean values, and many more
possible numeric values. Therefore, numbers that are different and compare
unequal will still both evaluate to true. Pigeonhole principle.

It seems you were surprised by the fact that Lua doesn't consider 0 false.
Fair enough, that behavior's different from many other programming languages.
But there's nothing inconsistent about it.

~~~
vor_
You're explaining the implementation, which I understand. There are reasons
behind everything in the infamous "Wat!" video. The inconsistency is in
conceptual expectations: (0) is true, (not 0) is false, yet (0 == true) is
false. These are unexpected "gotchas" familiar to experienced Lua programmers.

It's not a dealbreaker. It's just a Lua quirk that often surprises newcomers.
I was pointing out that Squirrel uses more conventional boolean evaluation
that script authors coming from other languages may be more comfortable with.
If you're exposing a scripting API, the language you use is essentially a part
of your user interface.

~~~
PySlice
As long as (0) and (not 0) are opposites; and (1) and (not 1) are opposites,
there is nothing wrong, inconsistent or surprising.

But I think I see what you are trying to say. You want the == operator to
_coerce_ its operands to the same type before comparing (like JavaScript's ==
operator), but Lua's == operator _doesn't do that, it simply compares_. And
that's why other languages need an === operator and Lua does not.

(JavaScript, by the way is the inconsistent one in this regard: the ==
operator does coerce its operands, but if(something == true) doesn't do the
same thing as if(something). Try it with an empty array)

------
johnmo
> The "hash" part doesn't have a defined length. Both parts can be iterated
> over using the pairs method, which allows you to count the number of
> elements in them

While true, you should iterate integer-key tables using ipairs and hash tables
using pairs.

> No continue statement

Continue doesn't exist? I swear I've used it in Lua 5.1.

~~~
vor_
There's no continue. Instead, you must use goto.

> While true, you should iterate integer-key tables using ipairs and hash
> tables using pairs.

In my opinion, this makes Lua's combination of arrays and dictionaries
pointless since one must distinguish between them anyway for iteration.

~~~
Hinrik
Do you really consider that to be a drawback? How often do you find yourself
wanting to iterate a datastructure without knowing whether it's an array or a
hash?

------
yeureka
I have been using Lua to script the audio sequencer on the game I am writing
and it rocks. No performance problems at all, even on an second generation
iPod Touch. And it is very easy to call Lua from C++ and C++ from Lua.

------
gruseom
It's neat to see Lua building up to critical mass based on just plain how good
it is. What will be the killer app?

~~~
chas
It is popular in video games already.
[http://en.wikipedia.org/wiki/Category:Lua-
scripted_video_gam...](http://en.wikipedia.org/wiki/Category:Lua-
scripted_video_games)

------
xtremejames183
There is now a serious alternative to lua: Jx9 which uses a syntax similar to
C and JavaScript and is being used in many commercial games.
<http://jx9.symisc.net/>

~~~
Jare
It looks neat, although the use of $ turns me off about as much as the
1-indexing in Lua. :) Do you have a list of released games that use it?

~~~
xtremejames183
<http://cplus.about.com/b/2013/01/27/what-is-jx9.htm>

~~~
Jare
I don't see a reference to a single game (or any other product) made using it.


Quick and Dirty - Raspberry PI Carputer / CarPC - TapaJob
http://moishtech.blogspot.co.uk/

======
antidoh
I saw nothing useful in that video. It seemed to be a Raspberry Pi powered by
car voltage, and a trick display. Basically a computer that can be used in the
car, but I already have one in my pocket.

Some text explaining why this is useful, and how this particular thing is
being used, would be helpful.


The 3 Most Common Topics You Hear as a Lyft Driver - stervy
https://medium.com/rideshare-journal/the-3-most-common-topics-you-hear-as-a-lyft-driver-14de5ba064dc
======
swframe2
As a lyft rider, I am surprised to have had 3 lyft drivers who moved to the
bay area in the 80s, own several houses and have a net worth of several
million.

The conversations I have had with lyft drivers have been very interesting.
Besides the convenience of not having to drive myself, meeting the drivers has
been a wonderful experience. I've learned a lot.

Just today a driver told me: if you are sad, you are too focused in the past,
stressed ... too focused on the present, anxious ... too focused on the
future.

~~~
SOLAR_FIELDS
I've had a few rides with such drivers. Generally they are older and want to
continually experience the world, so they drive so they can talk to people
about their life experiences. It's one of the cooler and more positive
byproducts of this rapid change in the transport economy that has had much
media coverage of negatives.

------
jaclaz
>Liked this article? Please subscribe to the newsletter above and recommend
the article below!

Which article?

For once the title is not click-baity and it is actually true and accurate, a
list of three most common topics heard (and nothing else).


Misconceptions About Forward Secrecy - xnyhps
https://blog.thijsalkema.de/blog/2014/01/17/misconceptions-about-forward-secrecy/

======
cies
It seems that in post-2013 articles on encryption the phrase "a malicious 3rd
party" has been completely replaced by the 3-letter acronym: NSA.

~~~
MattJ100
To be fair, they're one of a small set (possibly of size 1) of organisations
that would be able to carry out most of the attacks discussed. Things that
were considered highly unlikely pre-2013 are now a real possibility, if not
probability.

~~~
ithkuil
why? is there any revelation that they have the compute power to do that? Or
it's just because now it's know that they'd really like to do it?

~~~
schmichael
The NSA is somewhat open about the massive amounts of computing power they
have available: [http://nsa.gov1.info/utah-data-
center/](http://nsa.gov1.info/utah-data-center/)

Lots of goodies on this public site like "This [compute cluster] will give us
the capability to break the AES encryption key within an actionable time
period and allow us to read and process stored encrypted domestic data as well
as foreign diplomatic and military communications."

Obviously leaked documents and other media reports contain much scarier
revelations into what the NSA is capable of, but I thought I'd post what they
acknowledge since it's safe to assume they're capable of much more.

~~~
aneisf
In case someone doesn't pick up on it, gov1.info is a parody site.

~~~
schmichael
Wow I'm gullible.

------
wbl
This article is dead wrong on multiple points. First off, the impact of
multiple keys is different for the parallel Rho method: the time to the first
key to be cracked is the same. Secondly ECDH is commonly used to avoid the
problem mentioned in the second point. The worst part is people will make
decisions based on this wrong information.

~~~
xnyhps
My claim is: FS does not imply, by definition, that every attack scales
linearly in the amount of keys. Having a counter-example of an attack that
_does_ scale linearly does not disprove that point.

I indeed only cover DH at #2, as index-calculus does not apply to ECDH.

------
sp332
Looks like the page is dead?

Edit: oh it's back. In any case here's a better archive if it goes down again
[https://archive.is/2rQfr](https://archive.is/2rQfr)


Ask HN: What do you do when an homeless ask you money? - Buetol

Simple question. I meet a lot of homeless people here in Paris. My rule is to never give money but food and friendlyness. But I feel like there have to be a better way to deal with it.
======
jason_slack
I made friends with one particular homeless man a few years ago. His name was
Raymond, he had previously in life worked manual labor jobs, had a wife and
kid. A proud husband and father. His wife left for someone who could provide
greener pastures. He never recovered from that.

I would see him when I was out running errands in my neighborhood. He never
had shoes on. I stopped one day and asked him if he needed shoes and what
size. I bought them for him. I gave him some food. He refused it. I thought
that was odd.

I saw him about a week later and offered him food and he said no again. I
asked him why and he said it is because I didn't offer it to him in a bag to
carry it. Then it made sense. If he couldn't carry it, he couldn't keep it
long term. It was to much to carry around all day everyday.

Over the years I gave him clothes, food, books, an old laptop (which, yes, he
was using months later, so he did not sell it), inviting him to holiday
dinners and my friendship. We would chat for hours sometimes about whatever
was going on. He was very in tune with current affairs.

Then I stopped seeing him. I drove around looking for him. I asked some others
where he might be and nobody knew. I never saw him again.

~~~
sandebert
That story read like something from Adrian Tomine. Check out his graphic
novels if you are into that kind of thing. I recommend Sleepwalk and Summer
Blonde, I enjoyed them a lot.

~~~
jason_slack
I haven't heard of this author before, thank you for mentioning him.

------
lsiunsuex
I never carry cash and I very rarely see homeless people though I'm sure they
exist here.

A past job I held, we were a very large call center (I was in IT) we had
hundreds of call center employees - every christmas, we would get in touch
with local shelters and hospitals and do a "needy family fund" where employees
would donate canned food, toys for kids, blankets, etc... anything you could
imagine. We gathered so much we filled 2 21 foot vans and supported 30+
families.

It always infuriated me that we did this. Not that I hated giving - I gave as
much as I could, but that we ran a call center. Onsite training for the call
center was just 1 week and every week we'd have 10-20 new hires (badge access
was a nightmare) - we'd train anyone that could pass a drug test and pass a
basic math quiz and pay started at $16 / hour with monthly bonus.

I often said - "Why don't we give these people jobs? We hire almost anyone off
the street. The toys and food are great, but if you want to see someone smile,
give them a job and let them provide a real life for their family"

I never got a strait answer.

~~~
TheCoelacanth
A very large portion of chronically homeless people have mental illnesses or
substance abuse problems that prevent them from keeping a job long term.

~~~
mcv
But there are also a lot of people who simply slipped through the cracks of
the system and would appreciate any help to get back on their feet. A job
could really help them out. It can't hurt to try.

------
throwaw4y
Throw away account.

I live in South Africa where we have homeless people on almost every street
corner. Because of this it is quite easy to be desensitized about the divide
in wealth. It is also difficult knowing who to give money to as a lot of
homeless people don't want help and will buy cheap alcohol and drugs so giving
money can often enable something you really do not want. I also find it
difficult to build any sort of relationship with someone homeless because they
move around a lot, I've also spent a lot of time and money cleaning some
people up, buying new clothes and organising job interviews for car guarding
at shopping centres only to find out that I've been taken advantage of.
Instead now days I give 5% of my salary to charities and NGO's who specialize
in helping the needy.

~~~
Buetol
Funding free shelters with free food and computers would be ideal for me. So I
would redirect the homeless to these places.

------
jane_is_here
I give them money if I have spare cash on me. They need it more than I do.

As to what they use it for, they are adults and can make their own choices,
whether it be using it to pay for a EduX course ( unlikely ) or buying heroin
( unlikely ).

If you or I became homeless ( admittedly unlikely ) and begged for money (
hopefully unlikely ), surely you would want to be given money rather than fake
friendliness or food.

~~~
mgrassotti
totally agreed

------
jseeff
I generally avoid giving money as I don't know where it ends up and don't want
to support substance abuse in any way. I tend to give to charities helping the
homeless. When I used to live in London and worked for a huge organisation, I
also organised a "buy a lunch" campaign once every few months whereby anyone
buying in the staff canteen could either add a set amount of money or
duplicate the cost of their meal and all the funds (matched by my
organisation) then went towards providing meals and shelter for the
homeless....

------
Totoradio
I almost never give money, but I usually give cigarettes or meal vouchers and
chat a little. When I finish a book I give it too, it's often much appreciated
because as one guy said "you have no idea how boring it is to be on the
street".

------
rocky1138
Nothing. Charity is injurious unless it helps the recipient to become
independent of it.

Instead, I donate time and money to worthy causes which the homeless can take
advantage of.

I think this is an effect of living in Canada, where we have a very good
social system for homeless people. If someone is on the streets here, it's
likely because they have a mental illness which causes them to be unable to or
simply refuse help.

I am not sure what to do for people like that since "you can bring a horse to
water but you can't make it drink." How can you force someone to go get help?
I don't know the correct answer, but I know enabling them by giving them money
is not the correct answer.

------
jrochkind1
I give them $1, pretty much every time. I make enough money that this practice
isn't really noticeable to my budget, so why not? It's not my business what
they use it for, I drink and do other things myself too.

The one guy who is always there on my usual daily lunch walking route, and is
kind of creepy too, I now only give him $1 once a week instead of every day,
because it was starting to annoy me and be noticeable in my wallet. The other
older guy who is always there on my usual daily lunch walking route, and who
is clearly mentally ill but very friendly and I like him a lot -- he doesn't
ask me every day (but does say "hey, how's it going?" every day), so I still
give him $1 every time he asks.

------
smt88
In the US, our system for elevating the homeless out of poverty is awful, but
our system for taking care of their basic needs is good.

One of the results is that most homeless people who actually resort to begging
on the street are some combination of mentally ill and addicted to something.
The addiction is often self-medication for the illness.

What can you do for those people? They need psychiatric care that's tailored
to each of them.

I think the most you can do as a non-wealthy individual is to support
politicians who understand that most homeless people are sick, that they're
not trash to be swept into a landfill, and that they can be lifted out of
homelessness with the right help.

~~~
DanBC
> The result is that most homeless people on the street are some combination
> of mentally ill and addicted to something. The addiction is often self-
> medication for the illness.

You need to be a bit careful with this. You use the word "most", and you imply
there's a causal reaction: people have mental illness and addiction problems,
which cause homelessness.

[http://www.nationalhomeless.org/factsheets/Mental_Illness.pd...](http://www.nationalhomeless.org/factsheets/Mental_Illness.pdf)

> According to the Substance Abuse and Mental Health Services Administration,
> 20 to 25% of the homeless population in the United States suffers from some
> form of severe mental illness. In comparison, only 6% of Americans are
> severely mentally ill (National Institute of Mental Health, 2009). In a 2008
> survey performed by the U.S. Conference of Mayors, 25 cities were asked for
> the three largest causes of homelessness in their communities. Mental
> illness was the third largest cause of homelessness for single adults
> (mentioned by 48% of cities). For homeless families, mental illness was
> mentioned by 12% of cities as one of the top 3 causes of homelessness.

My worry is that people think better drug and alcohol treatment, and metter
mental health treatment, would cure almost all homelessness. It would get rid
of a lot of it, but not most of it.

It also doesn't recognise that being homeless probably causes some mental
health and addiction problems.

~~~
smt88
Sorry, I edited my comment after you had already copied it, so they don't
match up.

I meant to say that most of the people _begging for money_ are mentally ill,
addicted, or both. I got that info from a psych professor in college who was
researching homelessness with the CDC (they do that apparently).

It was only one city, but my assumption was that her research was a model for
many American cities. I could certainly be wrong about that.

I did imply that it was a causal relationship, and I certainly meant it. Part
of the definition of mental illness is that someone doesn't function in the
society in a prescribed way. That's also how people become homeless.

The point that people may also become mentally ill after becoming homeless is
well-taken, though, and I'd add that to my own comment if I could.

~~~
DanBC
I think we mostly agree! :-)

------
Dorian-Marie
I usually give all my little coins (< 1€).

Sometimes it's a lot, sometimes not. It's a lot to them but to me the coins
are annoying, I have to waste time sorting them and carrying them around. They
are difficult to spend for me.

------
MattBearman
Maybe it's a UK/US thing, as I know card payments are much more ubiquitous
over here, but I very rarely have any cash on me. I never need it, and I know
its the same for a lot of other people in the UK.

~~~
cphoover
In baltimore I've had homeless people come up to me with card readers. :) so
that excuse is going out the window. Here random guy let me give you my CC#

------
mgrassotti
I give $1 pretty much every time, which is a few times/day living in nyc.
Didn't used to but a few years back I read a book that changed my mind. Author
made the point that the best way to turn $1 into happiness is by giving away
in this situation. No matter what they use it for, the $1 clearly means more
to them than it does to me. I'd blow it at starbucks or whatever and not think
twice. More I think about it the more that seems true.

Only exception is if someone asks comes into restaurant and goes to each table
asking for money. That just drives me nuts.

~~~
Buetol
Only problem with this is that when you give to one, the others around are
gonna ask you too and I don't like feeling forced to do things.

~~~
smeyer
I haven't seen this problem before. In my city, panhandlers tend not to be
immediately next to each other (because it's worse for panhandling) and if you
walk by one and give a dollar, you can still walk by the next and not give
anything.

~~~
Buetol
Yep, in fact it's another kind of people. They want you to sign petition or
they want you to believe they are blind (they are looking for "gullible"
people)

------
mcv
I rarely have cash on me any more, but when I meet one near a supermarket, I
sometimes offer to buy something for them.

Years ago, I used to buy street newspapers regularly. The sellers are drug
free and actively trying to get their life back on track. But I never got
around to reading them, and it seemed like a waste of paper. I'd like to give
money, but the organization behind the paper warns against that, because the
entire point is that they earn their money, rather than begging for it. That
puts me in a complicated bind.

------
jtfairbank
I give him/her a cig and a smile. Its nice to be friendly. I also leave
bottles in an easily accessible cardboard box on days when I put the recycling
out.

I only give cash if they are contributing to the public space (playing music,
etc). For security reasons I avoid giving change or cash to someone who is
engaging me directly.

If someone seems interesting I'll def buy them a meal (and eat with them) to
help them out and continue the conversation.

------
lexandstuff
Always give money if I have it. If even a fraction of it goes toward food or
shelter, then it's money well spent.

------
blueflow
Similar to you, i never give money because of the abuse potantial, and money
itself is just a placeholder for what they actually need. Food does better.
I've made experience that alot of poor people are ashamed of their situation
and will even refuse when you offer something.

In German cities there is a trend to leave returnable bottles after
picknicking or just place them next to trash cans, a lot of poor people
collect them and are able to feed themselves on the bottles return value. This
seems to be the primary tactic here to keep those folks from starving, beside
from governmental support.

------
faithfone
I don't judge. I don't even think about it. I just give whatever I can afford
when asked. Sometimes it's $20+. Other times it is nothing.

------
brickmort
living near NYC has taught me to ignore beggars. At a certain point, you lose
sympathy because you can't distinguish who genuinely needs it and who's just
looking to make an easy buck.

------
airframeng
If one earns enough to the point that pocket change (coins) has become a
burden to carry around and one has the "opportunity" to give it to the
homeless, then it's a win-win.

------
tmaly
I use to not give money and just give food. However now, if I see the same
person out there in subzero temps, I usually give them a $20. I just think,
hey maybe someday that will be me.

------
fleshshelf
I don't want to give money to anyone unless I think it can really help to
solve a root cause of their poverty. I prefer redistribution of wealth to
individual contributions.

~~~
fwn
Individual contributions cause redistribution. Did you think charitable
organisations or just government?

------
danvesma
I give a small amount of money – its more dignified and trustful than trying
to buy them food.

~~~
jseeff
I think offering to buy someone a meal is pretty dignified, especially (but
not only) if you have time to eat with them.

------
radoslawc
bum: sir you maybe got some spare change? me:funny I was just about to ask you
the same question

As a rule I never give anything to homeless, they are homeless because they
like to live like that. There are plenty places where they can seek help, many
of them founded from my tax money. Only requirement is to be sober. Giving
them money, food, clothes etc it only makes worse since they can spend all day
to get hammered.

~~~
jseeff
I agree that it is not always the best solution to give money (rather than say
food etc) but "because they like to live like that" is (as far as I am able to
ascertain) a huge over-simplification and in many cases probably an outright
falacy. It is well documented that (as with the prison population) there is a
high occurrence of mental disorder in homeless people.

~~~
radoslawc
Right, that was oversimplification from my side, and cost me 4 precious carma
points so far. Sure. But I live in city with loads of tourists, and most so
called "homeless" people here are not people struggling to live trough another
day, but rather making good living out of scared tourists.

~~~
jseeff
I'm still quite new around here so don't fully understand how all this Karma
thing works - sorry if I somehow caused you to lose something! (Incidentally,
I would love to understand it better, know how to search and track replies to
comments etc without having to re-read the whole thread, but I digress...)

I think the point you make is different to "choosing".... and is the main
reason I prefer to give something that a truly needy person will definitely
appreciate (e.g. food, shelter) rather than something that could be spent on
alcohol, drugs or be taken by someone who isn't really needy.

In sum though, I think as long as someone is trying to help, each can choose
his or her own preferred way to do that :)


The Social Network Wars Begin In Earnest: Facebook Bans Google Friend Connect - kyro
http://www.techcrunch.com/2008/05/15/the-social-network-wars-begin-in-earnest-facebook-bans-google-friend-connect/
======
dbreunig
Given that Google was tapping into Facebook as if they were an Open Social
partner, I can see why FB was quick to react.

In other news: who is completely underwhelmed by G's Friend Connect? Since
when is MySpace the innovator?

~~~
blogimus
Well, I've not checked out Friend Connect, so I can't comment on that, but as
far as being the innovator, when you do enough stuff, it is highly unlikely
you'll get is all right. Look at Google Video versus YouTube. I (and most
everyone else it seems) ignored Google Video after trying it out for a little
bit and just went to YouTube by default.


The Unbelievable Story of a Facebook Impostor - yugoja
http://the-ken.com/the-unbelievable-story-of-a-facebook-impostor/?t=2317a310-7348-11e6-8807-3d27b63a55b2-db643261-252a-4e7e-95a6-f89a72c14fcc&utm_campaign=The%20Ken&utm_source=Email&utm_medium=Newsletter#
======
celticninja
If I have to sign up just to read it, it's not worth it. Even bothering with a
mailinator address is not worth it.

------
yugoja
Chilling account of how one Facebook impostor is wrecking havoc on lives of
one Mumbai couple.


FCC releases the full National Broadband Plan - anigbrowl
http://www.broadband.gov/download-plan/

======
anigbrowl
I know a lot of the details have already trickled out in recent weeks, and
it's a lot of reading, but I really think that a 10-year, ~$7 billion
investment (which has already been allocated and does not need further
congressional approval) in digital infrastructure is of major significance to
HN readers.

The goals (from the executive summary):

Goal No. 1: At least 100 million U.S. homes should have affordable access to
actual download speeds of at least 100 megabits per second and actual upload
speeds of at least 50 megabits per second.

Goal No. 2: The United States should lead the world in mobile innovation, with
the fastest and most extensive wireless networks of any nation.

Goal No. 3: Every American should have affordable access to robust broadband
service, and the means and skills to subscribe if they so choose.

Goal No. 4: Every American community should have affordable access to at least
1 gigabit per second broadband service to anchor institutions such as schools,
hospitals and government buildings.

Goal No. 5: To ensure the safety of the American people, every first responder
should have access to a nationwide, wireless, interoperable broadband public
safety network.

Goal No. 6: To ensure that America leads in the clean energy economy, every
American should be able to use broadband to track and manage their real-time
energy consumption.

Gigabit internet, folks. Think about it. This is a very large infrastructure
project.


Google relents slightly on blocking ad-blockers – for paid-up enterprise Chrome - nachtigall
https://www.theregister.co.uk/2019/05/29/google_webrequest_api/
======
lern_too_spel
Now Chrome will have the crippled adblocking capabilities of Safari. This is
the browser equivalent of removing the headphone jack — removing a feature
many people use to get some security benefit for a few. The problem for Google
is that unlike Apple's customers, you can't pee on a Chrome or Android user's
back and tell them it's raining. No Android user was happy the headphone jack
went away just because there are wireless options.

Since Google controls the extension distribution system, it could just as
easily plastered extensions that use this API with scary warnings, so only
users who knew what they were getting into would install them. It's not like
users install so many extensions that use this API that they would start to
ignore the warnings.

------
ohpls
At least whatever Google decides to do I'll still have my Pi-hole blocking ads
and trackers

~~~
danShumway
Domain-based filtering isn't enough to block all ads and trackers -- unless
Pi-hole is doing more than just acting as a DNS server nowadays; I haven't
checked in a while.

In particular, using Pi-hole forces you to decide globally what domains you'll
block -- so you can't (for example) block Twitter/Facebook on 3rd-party
domains but allow it when you directly visit them. DNS blocking also can't
handle individual URLs within a domain -- so you won't be able to block ads on
sites like Youtube or Facebook.

Aside from lacking granularity for when domains are allowed or disallowed, Pi-
hole also won't protect you from the majority of first-party tracking. That's
less of a concern though because (at least for now) the V3 manifest isn't
stopping extensions from blocking tracking cookies or disabling features like
Canvas, so you can still rely on them for that.

Typically though, I advise people to prefer extensions like UMatrix and Ublock
Origin, and to fall back on Pi-hole as a backup strategy when nothing else is
available. It's useful (particularly to help with native apps and IOT
devices), but I don't think it's a substitute for a good browser-based ad
blocker.

------
iamthatiam
Does this impact chromium? Will Brave Browser continue to function?

~~~
rasz
Yes it does, and will put a burden on forks to maintain their own patch tree.
Vivaldi already semi declared unwillingness to do it.

------
anfilt
That does not really seem like a "relent"...

------
m-p-3
If that's not a good reason enough to switch back to Firefox, then I don't
know what will.

------
winkeltripel
Still looks like scummy behaviour to me.


Iron Man-like Exosuit to Expand Ocean Exploration - ferrantim
http://www.scientificamerican.com/article/iron-man-like-exosuit-to-expand-ocean-exploration-video/
======
chton
With this being a rigid suit with normal air gas mixture, are divers still
susceptible to decompression sickness? Is the pressure inside the suit the
same as sea-level ambient, or is it higher to reduce the strain on the suit?

On a different note: can we please, pretty please, stop calling every form of
suit 'Iron Man-like'? Aside from being made of metal, this bears almost no
resemblance.


Ask HN:why do titles get changed? - thijser

It seems that the title of HN posts get changed to the website title after a post gets reasonably popular. This often loses the point the poster wants to make (for instance today with the Manchester website).
Why is this? If it's automatic, shouldn't it be turned off?
======
brudgers
Titles should not editorialize.

~~~
BoyWizard
But they should give context, which is often

a) purpose for posting (ie 'I like the design of this site', or whatever), or

b) context that is inherent in the article but not obvious as a submission (ie
the topic of a blog).


Ask HN: Great links for arduino hackers? - ritonlajoie

What are your favorite ressources for arduino related news ? Is there a HN-like website for arduino ?
======
ritonlajoie
Here is my small list:

\- <http://hackaday.com/> : general and also arduino based hardware hacking

\- <http://makeprojects.com/> : great books & resources

\- <http://www.instructables.com/> : projects (some based on arduino)

\- <http://arduino.cc/forum/> : the arduino official forum

~~~
Swisher
I second www.instructables.com. Don't forget www.adafruit.com but where I have
really found what I need is simply google. If you know what you are looking
for just use proper search terms and typically there is someone who has
already done at least a portion of what I am working on.

------
leh
I haven't found one yet. hackaday.com isn't Arduino only, but they cover a lot
of interesting projects with Arduinos.

~~~
ritonlajoie
I really like hackaday, although it's not arduino based only.

------
trafficlight
<http://reddit.com/r/arduino>

------
nottwo
I maintain an Planet aggregator for tracking Arduino-related blogs that pique
my interest: <http://planet.nottwo.org>

Kinda plain, but works well in my feed reader.

------
katherinehague
<http://makezine.com/>

------
dramaticus3
/dev/null

get off the internet and build things


Show HN: DOM99 Simple HTML manipulation for the modern web - GroSacASacs
https://github.com/GrosSacASac/DOM99
======
plugnburn
Some questions:

\- Why ES6/ES2015?

\- What are the advantages over Knockout?

\- Why does it weigh so much if its only ability is two-way data binding?

And probably the most interesting question:

\- Why the heck do I need to use Browserify for something that will NEVER EVER
run on a server side?!

P.S. Nice monologue though. :)

~~~
GroSacASacs
-Why ES6/ES2015? Because I got used to it before. You can use Babel to transpile to ES5.

\- What are the advantages over Knockout? I didn't use Knockout since a long
time, it was a source of inspiration, so I can't fully answer this question.
DOM99 doesn't tell you to use the Model-View-View Model pattern, but lets you
organize your application as you want. This can also be a disadvantage if you
are doing it wrong for example.

\- Why does it weigh so much if its only ability is two-way data binding?
Because you looked at source files that are not minified.

\- Why the heck do I need to use Browserify for something that will NEVER EVER
run on a server side?! You don't need browserify at all. I wrote the readme a
bit too fast and forgot to mention other methods. You can also load it like
any normal js file.

Hope I helped, I will update the readme in a few minutes to show how to use it
without browserify. If you have other questions just ask.

------
GroSacASacs
Here's what is coming in the next few days:

\- More examples that you can look at

\- Templates with data population mechanism

\- Better Readme file (how to use babel etc.)

\- Other system improvements

~~~
plugnburn
Understood everything about it, except this:

Could you please calculate what does it weigh minified in ready-to use ES5
state? I'd like to compare it to some other ready libraries and my own
solution.

~~~
GroSacASacs
I will make some system improvement before I calculate those kind of things,
but I guess it will be less than 2 KB.

------
GroSacASacs
new demo page for DOM99
[http://rawgit.com/GrosSacASac/DOM99/master/index.html](http://rawgit.com/GrosSacASac/DOM99/master/index.html)
(Works with Firefox)

Proper template engine API and more system improvement coming next.

------
herbst
Your example is not working (for me) on Chrome.

~~~
GroSacASacs
I will update the readme to show how to transpile DOM99 to ES5

~~~
GroSacASacs
Done


Who Really Benefits From Interest Deductions - 001sky
http://www.nytimes.com/2012/10/28/realestate/mortgages-who-really-benefits-from-interest-deductions.html

======
mooism2
It's only talking about mortgage interest.

That's a pity. I'd like to read a well-written piece about how interest
deduction for business works out. It seems designed to make it easier for
businesses to invest, but I wonder how the costs of leveraged buyouts etc
compare.

~~~
001sky
The analysis is the same. The tax-deduction is a subsidy to the <equity>
holders, of whatever asset class. So, for homes, the subsidy accrues to the
equity holder. For business, the same thing. Policywise, housing is
consumption (luxury, in particular) and business capital structure is
investment. Subsidizing the latter has a far stronger policy rationale per-se
but the capture technique (components of cost or net profit) is arbitrary.
Analytically, see:
[http://en.wikipedia.org/wiki/Modigliani%E2%80%93Miller_theor...](http://en.wikipedia.org/wiki/Modigliani%E2%80%93Miller_theorem#With_taxes).


Valleywag: Why your snark is going to get us all killed - nikunjk
https://medium.com/one-world/b2d719a52f3c

======
calbear81
No one is denying that what Justin proposes is noble and good, it's that he
framed his appeal in such an overwhelmingly positive happy-go-lucky manner
that it was almost farcical.

I know he means well but I think it would have generated less snark if he had
balanced his talk with some discussion of the alternative. Yes, people in tech
have a lot of power but would be remiss not to think of the responsibility.
Build great things but understand the concerns people have around privacy,
morals, and ethics in this brave new world. That would have generated more
critical discussion and reception.

------
MaysonL
I am reminded of Doris Lessing's saying: "It is not a sin to be second-rate.
It is only a sin not to try to be first-rate."


Ask HN: Can a liberal arts BA who can write code break into the tech industry? - avnit
I have very limited experience in the industry, but I'm confident in the skills I have and my ability to learn. I've been programming since I was 12 or so, and have always planned to try to make a career out of it. I have been working as the "webmaster" (i.e. updating static content and sometimes coding new pages) for the health services provider at my university for over a year, so I do have some applicable work experience.<p>I want to break into the tech industry, but I'm not sure exactly how to go about it without the requisite degree or industry experience. I have a github and a website (http://avivnitsan.com), but what else can I do to make myself employable? More broadly, my question is: can a liberal arts degree combined with some technical skills and ambition lead to gainful employment in the tech industry?
======
Spoom
I don't have a bachelor's degree at all (I have an associate's) and I am
working as a professional software developer for a startup, so yes.

I recommend you do some freelancing as it's potentially the easiest way to
break into the industry in your situation. Look at markets like
[http://guru.com/](http://guru.com/) and see if you can find projects that
match your skillset.

Build up a bunch of five star feedback, and then start applying for full time
positions (if that's what you want) with your freelancing profile as your
portfolio. Worked for me!

(Note as some others have mentioned, however, that you will not be able to
work for a top software company like Google or Microsoft as you will be
instantly filtered out for lack of academic qualifications. Your only real
path into one of them is through an acquisition.)

~~~
bitemix
I disagree. I'm employed by Amazon, and have gotten interviews with Facebook,
Twitter, and Microsoft without a degree of any kind. If you can prove you can
keep up and have a body of work behind you, credentials matter much less.

~~~
Spoom
You could be right. I've had internal recruiters at Amazon try to get me on a
phone interview; I always assumed that I'd be filtered out once I did the
interview though. I've read a lot of anecdotal evidence that Google and the
like have high academic requirements but maybe they're more flexible than I
thought.

~~~
twunde
I believe that Google is changing as I read somewhere that they found no
correlation between a good degree and good gpa after a few years of work
experience. In general, most places have figured out that you don't need a
college degree, but you will need to have work experience to show that you
have the skills needed.

------
joeclark77
I graduated from college in 1999 with a BA in Communication but I had been
making web pages with static HTML for four years and had done some small
freelance sites for companies in my home town during my summer breaks. I found
my first few jobs very quickly, trained myself in some new skills, and was
offered a promotion into the "engineering" (aka "real programming") department
very early on. It is definitely possible!

At the time, I made a "portfolio" with color printouts of the web sites I had
designed and built, and attached it to my resume. I believe that was the
strongest element in getting hired: I had already shown them that I could do
the job. Maybe your github account is the 2014 equivalent of my portfolio. It
depends what you have on there, and who's reading it. I would also consider
providing them with compiled, working applications, because the gatekeeper
might be an HR person who doesn't know how to evaluate source code.

------
Eleopteryx
I don't even have a college degree and I'm a software developer. It's been a
stumbling point in a couple of interviews, but some interviewers have never
even asked about my education level and are just concerned about what I can
do. My first gig only paid $20/hr (and I didn't haggle at all) but the
experience I got has allowed me to move on to higher rates/salaries.

For me the important thing was to network with people in the industry.

------
mixmastamyk
I wouldn't worry so much about labels... rather start working on things like
personal and open source projects and let them do the talking.

------
pc86
I'm assuming for a moment that you don't want to do research at Google or be a
Senior Software Architect at a Fortune 10 company (both of which are still
possible, though). For the majority of rote day-to-day programming gigs, even
having a Bachelor's doesn't get you much over those who don't. Experience
almost always trumps education in this field except for a few exceptions like
those mentioned above. But you've got a leg up on those who don't have a
degree - you've got one, it just doesn't happen to be in a relevant field. I
was in your boat several years ago. My Political Science degree made it
extremely hard to find a hiring manager/owner who was willing to take a
chance. I did not have a github profile at the time (it was not that long ago)
but I did have a website with some code on it (that my future employer did
look at).

Just keep in mind that you will not command the same salary as someone with a
relevant degree, at least until you have a portfolio of work comparable to
theirs.

------
AdmiralAsshat
I've got a liberal arts BA (Religious Studies) and was hired for an entry-
level job at a software company based simply on my existing experience from
doing hardware repair/helpdesk support/webpage maintenance jobs part-time
while I was in college. My initial position was strictly application support
and did no coding outside of some shell scripts, but within a year or so they
started giving me other responsibilities. My smaller company was then acquired
by a larger company, which made the position and experience look much better
on my resume, and I was able to interview with other places much more easily.

For what it's worth, once your foot is in the door, in my experience most
employers don't seem to care that much about the degree. I'll still get the
"Religious Studies, huh?" comment from the recruiters/headhunters, but once I
talk to someone who actually knows what they're doing and we get to the
technical interviews, that stops being a concern.

------
Jemaclus
Yes.

The trick is to frame your skill set in more generic terms. For instance,
imagine an actor. Actors don't just play around on stage and quote Shakespeare
all the time. More broadly, actors must:

        * Learn vast amounts of material in a short period of time
        * Work independently
        * Work as a team
        * Accept criticism
        * Show up on time
        * Meet deadlines (the show must go on)
        * Adhere to a strict schedule
        * Speak comfortably in public
        * Have good communication skills
        * Basic improvisational skills
        * Empathy

How many of those do you think would be useful in a tech job? (Hint: all of
them)

Take what you know. Broaden the scope. Mix in some code and a basic portfolio.
Get a junior position somewhere. It's possible.

Good luck.

Source: Bachelor of Arts in Theatre, Masters in Secondary Education, currently
lead developer of large startup in SF

------
Someone1234
Make a portfolio of your work. Use that portfolio in your resume/CV and give
links so perspective employers can access your sites and play with them.

Also doesn't hurt to publish on something like Github (open source software)
since that gives even more access to your work (and shows that you can get far
enough to publish something useful).

There are definitely companies who will hire someone with a proven track
record but no academic qualifications. You won't get hired by Google or
Microsoft Research since they're super academically obsessed, but a lot of
medium-small businesses would love to have you.

------
porter
Yes. According to my friends who hire and manage a lot of programmers in
silicon valley, it's not totally uncommon to see a self-taught dropout hired
over an MIT grad. You can be self-taught and very successful on the software
side of startups. And, as hard as it might be for you to believe now, not
everyone with a CS degree knows what they are doing.

------
alttab
Are you looking for Google, Microsoft, Amazon, Facebook? A start-up? Are you
willing to relocate?

~~~
avnit
I'm mostly looking for a startup but I'm open to anything really; I wish I
could relocate, but I'm committed to living in Boulder, CO for the next year.

~~~
alttab
If that's the case, then you have pretty much a 30 mile radius of companies
you are looking at. Determine what the bar is to get an entry level position
at those companies, and make your skills match them.

------
warmfuzzykitten
Go where the jobs are. Interview a lot. Study up. Interview more. Take any job
that gets you closer to your goal. E.g., QA can be a good place to start.

------
spacemanmatt
Put your experience on your resume, try to get interviews. Same as someone who
does have a degree.


Ask HN: What do you do on the weekends? - mburney
Hey HNers,
I realized that I've been working too hard on my startup, so I decided to force myself to take weekends off.
I've found it to be a lot harder than I expected. Since I've lost touch with most of my friends and I am single, sometimes I'm at a loss what to do when I'm not working.
I'm 28, and not too excited these days about drinking or partying throughout the weekend. I have a side-hobby (jiu jitsu) but I usually do it on the weekdays just before I get started on my work.
I find myself wanting to read a book on compilers, or think about marketing or something startup-related, but I force myself not to do those things, since it seems too work/tech related.
So I'm wondering, what do you guys do on your time off? How do you achieve that work-life balance?
======
Sukotto
I have 2 kids and an infant. My wife works most weekends (fri noon through sun
night) so I spend my weekends as "single dad".

Lots of playing on the floor, going to the park, cooking, and that sort of
thing.

It's a reasonably good life though I sometimes envy you single, childless guys
for the enormous number of hours you get for yourselves. You think you know.
But you really have _no idea_ just how much time you have right now. Enjoy it

So from that perspective here's my advice. Do all the stuff you can't do when
you have kids. Have lots of sex. Go on spur-of-the-moment day trips. Stay up
late and sleep all day. Take flying lessons, or dancing lessons,or whatever.
Seriously work towards ticking off items on your bucket list. Don't just sit
around though because as soon as you have kids your combined disposable
income, free time, and social flexibility shrink to a thousandth of a percent
of what you have now (that's only a small exaggeration

~~~
cheald
> Do all the stuff you can't do when you have kids. Have lots of sex.

Boy, there's a self-defeating setup if I ever saw one. <g>

------
nostrademons
Losing touch with your friends is your first mistake. If you rebuild those
relationships or forge new ones, almost everything else will take care of
itself.

As for what I do - yesterday was Stir-Fry & Starcraft, a home-cooked meal at
friends' house followed by like 10 games of Starcraft. Tomorrow I'm seeing
Harry Potter with a couple friends. Last week was dinner & Super 8, along with
more Starcraft. The weekend before was a party at the Rainbow Mansion and July
4 fireworks. The weekend before that was some off-roading with a friend and
his Jeep and a lunch date with a girl off OKCupid. Somewhere in there was a
kayaking trip as well. Various other first dates have also been had in the
weekdays between them too.

Edit: Okay, I just did a couple code reviews for work an hour ago. I swear,
it's not my whole weekend!

------
salsakran
Reconnect to old friends or make new friends. While there's a certain
masochism about sacrificing everything on your startup vibe on HN, if you want
to do startups/entrepreneurship for more than a single deathmarch to burnout,
you need to keep things sustainable.

Keep training jiu jitsu, maintain social relationships, chase girls (or boys
or whatever) and make sure you allocate time to keeping yourself healthy -
physically, mentally and emotionally. For most people that means a social
network (not the facebook kind) to keep you grounded.

Otherwise, pick a hobby, preferably one that is social but where you won't be
tempted to spend escalating time on it. Sports league, dance, improv,
whatever.

------
mindcrime
_what do you guys do on your time off?_

Time off? What's that?

 _How do you achieve that work-life balance?_

I'm working on a startup, I don't have time for work-life balance.

What do I do on the weekend? Well, I get off of my dayjob around 5:00pm on
Friday, I drive home, swinging by the grocery store to stock up on coffee,
sugar, cream, sodas, etc., then settle into my favorite chair with my laptop
and start coding... continuing until around 6:00am or so, on Sat. morning.
Sleep until 1 or so, get up, work another couple of hours, then take a brief
break by going to Barnes & Noble for a latte or something and to browse books
for a while, maybe sit in the cafe and read for a while. Then I come back
home, and start working again. That goes on until 3-4 or so on Sun. morning.
Sunday I usually get up around noon, work another hour or two, then do
laundry, and the last few hours of the day before going back to bed, I either
work, or -when I'm feeling burned out and needing of a break- watch a movie or
something.

~~~
HeyLaughingBoy
Yikes! Sure hope the end result is worth it!

~~~
mindcrime
You and me both. But really, I couldn't do this forever, obviously. It's
basically like what pg talks about... the goal is to make some serious
sacrifices for a certain period of time, where the payoff - if things work out
- is a lot of freedom later in return.

Yeah, it may not work out and - worst case - all this hard work goes for
naught. But I turned 38 today, I'm not getting any younger, and if I intend to
live out some of my dreams, it's time to make it happen.

------
zachcb
Since I don't work for a startup, I spend most of my weekends wishing I was
working on/in a startup. I have few friends, so when I'm not doing anything
productive I feel mentally awful and occasionally get chest pain. So weekends
are pretty tedious for me.

This isn't your standard answer, but I figure I'd give you a perspective from
someone on the outside wanting to get on.

------
chmielewski
Too easily, one can justify that their computer is both their work AND their
entertainment. I've enjoyed trying my hand at some offline gaming. Feeling
like anything fantasy/sci-fi can be a waste of time, I turned to a WWII
tabletop miniatures war game called Flames of War. It's a three in one: social
interaction with some older guys that I can shoot the bull with whose social
circles I wouldn't usually fall into, diorama construction and historically
accurate miniatures painting (hone those artistic mind-muscles), World War Two
history. I'm not trying to go for a shameless plug but I've found in it more
than a game, not imagining I would have learned so and become THIS much more
interested in history. ..and as some of the other comments have pointed to,
exercise is ++. Hiking, biking and exploring the OFFLINE world around you can
be key to returning fresh (and inspired!) on Monday.

------
tsewlliw
I have a small boat (starfish). I sail it in smug bliss over my graceful
mastry of the winds. Im a complete sucker for things like codifying board game
rules in prolog, but that doesnt cross your mind when you are lord of the
local waterways.

------
pingswept
Recently, I've been moving really heavy things (like a slab of granite for a
stoop and a cast iron sink in my basement) from one place to another using
minimal force and simple machines (wedges, levers, etc). This kind of work is
as far from programming as I can get, but still has an intellectual component.

I've found Jaimie Mantzel's videos about roadbuilding to be a good explanation
of what I mean: <http://jamius.com/Road.html>

~~~
Groxx
That video is oddly mesmerizing. The second one is better though :) It has
bouldery excellence, Queen, bees, and you get to watch him _push a frickin'
tree over_. Though in the 3rd, he discovers "the world of BULK LEGO on eBay".

I think he _is_ going slowly crazy. Or more comfortable with the camera.
Though are those all that different, really? Great entertainment, either way
:)

------
aspir
Run, eat lunch with friends, and do as much creative/educational activities
not directly related to my day-to-day as I can. That also includes doing
"touchy-feely envisioning" for some of the time. If partially relates to my
job, of course, but it helps me get ready for the next week. Taking a step
back from work while actually thinking a little bit about work itself helps me
charge back up.

------
mannicken
Weekends have kind of stopped existing for me. I do not understand the
necessity of having certain time for work and certain time for leisure. I'm
going off of fundamental principles of delivering basic value to whoever needs
it in return for money. And who fucking gives a shit if I created that code on
Monday from 9-5 or on Saturday at 3am.

------
jh3
I go to bars with friends, I go to concerts, I read, I sometimes just go to
places like Barnes & Noble, buy a coffee, and either read a magazine or just
sit around and watch people. Lately I've just been going out with a few close
friends, usually to a bar or two or three, to drink and laugh and talk and
have a good time. It never gets old if you're with the right people. Yeah,
it's not hiking or biking or walking, unless you count walking to the next
bar, but it's always great being able to unwind. Definitely not the healthiest
weekend activity, though. If you can handle being alone and have some money to
burn you should travel. I'm going to Europe for a couple of weeks just for
fun. Being single has its perks.

There's nothing wrong with reading a book on compilers or thinking about your
startup's marketing campaign, but I think it starts to become wrong when
that's all you do. Being single isn't necessarily a bad thing either. I mean,
it isn't the greatest thing all the time, but that all depends on how you're
looking at it.

Anyway, if you think it's fun to just sit around and read then by all means do
that. Don't think you have to do something else. By the looks of it though,
you don't think it's fun. It seems like you're forcing yourself to think it's
fun because everything else seems scary or too difficult to do. Don't just
work all day everyday. You'll just burnout and be worse off then you are now.

------
ajdecon
The key, for me, is forging and maintaining relationships with other people. I
spend a lot of time with my girlfriend, which is the best thing ever. I hang
out with a few close friends. When I can commit to decent blocks of free time,
I fence epee and go kayaking, and socialize with others who take part in those
activities.

When I can't manage that kind of commitment, or I need solitary time, I read a
lot of fiction and play with the cats. I also have some hobbies with low time
commitments or at least a lot of flexibility: robotics, learning about science
outside my own field, brewing beer. Occasionally I'll do something related to
my current field (HPC), but even then I have a strict no-real-work rule: the
only work that gets done on weekends, barring emergencies, is on side
projects.

I learned to do this after grad school, during which I focused on my work
100%... and then experienced a period of burnout so intense I could not
imagine ever being happy again. I know a few of people who seem happy, or at
least satisfied, in a cycle of 100% for a year or two, followed by 4-6 months
of burnout, then back to work. But my burnout was accompanied by depression,
continuous feelings of failure and shame, and a deep lack of interest in
anything in the world. No amount of productivity is worth my sanity: I _need_
my work-life balance.

------
Kilimanjaro
I work my ass off coding mon-fri for my corporate overlord, to spend the
weekend on my most rewarding hobby: coding.

~~~
reduxredacted
Work-life balance is when your _work_ is reasonably a _hobby_. In coding, a
lot of the things we hate at work tend to be the bureaucracy associated with
being part of a _traditional corporate_ "team".

I always joke that I'd do 80% of my job for free (as long as the people I'm
joking with don't work for the company that employs me).

I liken it to architecture/building: The day job is designing and overseeing a
great McMansion. In the end, it's pretty nice, but a lot of the time is tied
up in passing inspections. On the weekend, my kids (...and me) have the most
amazing tree-house ever imagined.

------
mbenjaminsmith
Pack the trunk with (micro)brews and drive the family down to the gulf (of
Thailand). We sit on the beach, eat seafood and drool at (future) beach
houses. If you're trying to fight off burnout I don't think you can beat the
beach. On the other weekends we go restaurant hunting, go to movies or watch
friends' bands play. A big dinner and a movie is usually enough for a weekend
recharge.

------
gte910h
Dinner with friends every Sunday at our house, cooked by my wife and I, with
some settlers of catan type board games before/after. (6 years now, jeesh,
that's like 250-300 dinner parties come to add it up).

Some time walking someplace on Saturday (usually a restaurant).

Watch some stupid something or try a cheap steam game or play a wii dance
thing.

Read a novel/part of a novel.

Sleep in a lot.

Take a trip with the wife to a cuban sandwich shop

Improve some part of my condo.

------
staunch
Posting this on a Saturday might skew the results.

------
ja27
I usually have things with the kids - scouts, sports, church, First LEGO
League, etc. but the summer is pretty quiet. There's also yard work. I get
most of the other housework done during the week. Since I have a "day job", I
usually spend part of the weekend lining up scheduled blog posts, tweets, etc.
for my side things. I should spend more time coding for side projects but I
don't.

Before kids, I used to go hang out at a bookstore for a couple hours and read
whatever I found interesting, go for long off-road bike rides, volunteer for
fund-raising walks/bike rides, volunteer with the Red Cross, hang out with
friends from a ham radio club or college, etc.

If you can't reconnect with friends, just make new ones. Try meetup.com, look
for tweetups or barcamps, go to user group meetings, join clubs (ham radio,
model railroads / rockets, LEGO, cycling, etc.), take a class (cake
decorating, painting, etc.), volunteer somewhere, go check out events at local
bookstores / libraries, etc.

------
grigory
Lots of mountain biking and hiking. Heading out to local mountains tomorrow
with SO to hit the trails and hike around a bit. I have a long list of books
that I'd like to read, so I get to them in the evening usually.

If the weather is bad I play with things like Arduino and toy around with new
languages.

Also, coffee shops with friends, sometimes dance clubs if a good DJ is in
town.

------
proxwell
I set my own schedule, so I don't really distinguish between week and weekend.
I'm often working on the weekend and you can find doing weekend-like
activities during the week: surfing, mountainbiking, snowboarding, etc. I
especially like having the flexibility to do these things during the week as
the crowds are usually much smaller on the mountain/trail/lineup.

For me, the weekend is different primarily in that I get less email from
clients and partners. This can be an advantage in that it enables me to have
more uninterrupted work sessions. Of course, many of my friends do work
traditional work weeks, so I often make time on the weekend to do things with
them – dinners, dates, hikes, etc. The weekend is also a better time for me to
make my international flights, as it minimizes the impact to my availability
during the workweek.

------
bdickason
I'm a product manager by day and I generally have a hobby that I throw myself
into on weekends that may/may not be work related. Currently, for example, I
alternate between coding (something I don't get to do at work) and playing
video games like TF2. Once my wife gets home, however, we do stuff like
rooftop gardening, going out to dinner, etc.

My past 'obsessions' (as she calls them) have included DJing 3-4 nights per
week, producing Disco music, playing world of warcraft, and doing
kickboxing/jujitsu.

In short, do what you feel passionate about whether it's work-related or not.
If you feel like you should be spending time with your friends, go for it! If
you feel like doing startup stuff, do that.

As long as it's what fuels you, work-related stuff is not a bad thing.

------
calebmpeterson
I can relate. After starting a job out of college, I had to spend 40+ a week
at work, and then still had my own side project(s) to work on. It's been a
process for me to learn to take time off and invest in other deeply important
aspects of life.

I realize this isn't directly relevant since you're currently single, but... I
spend time with my wife and son. In your case, try to reconnect with close
friends you've lost touch with, call your dad/mom/brother/sister etc...

Another idea is to get outside, do some walking/hiking/cycling/swimming...
This can be a bit of a beast during the hot summer months depending on your
location; it's usually cool in the mornings pretty much anywhere though.

It's hard to re-learn relaxation but it's a worthwhile endeavor!

------
mehmeta
Dancing tango and jumping out of planes. Both are very rewarding and clear
your mind like nothing else. With skydiving you get to do exciting and
challenging stuff with your fellow jumpers, since it requires no less than
absolute concentration it's great for getting away from the stress of the
daily grind. It also makes me go outside and soak up the sun, which is great
since I'm not as attracted to most other outdoor activities.

Dancing provides the physical activity you terribly need as a knowledge
worker, while doing something fun. I've also come to experience that it also
effortlessly generates a social life for you which can expand to as much time
as you'd prefer to allocate to it.

------
agentultra
I'm not doing a startup, but I have had to defend my separation of work and
life rather strongly in my circles.

Here's my take on it: we're all dying. You get a very limited amount of time
to spend in the best amusement park ever. Once it's gone your done. So try and
have some fun along the way.

When I'm not working I'm thinking about programming. Or I'm climbing a
mountain. Camping. Running. Spending time with my wife. Painting. Playing my
guitar. Climbing trees. Occasionally I'm out at the bar with friends.

I prefer to be alone most of the time. It's where I get my energy from.
Ultimately you just have to discover what works for you.

------
dennmart
I've spent a good chunk of the past ten years using almost every moment
reading up and learning about all things tech. This year, I decided to hold
back on the tech stuff and started to read up and learn a foreign language
instead (Japanese). It's been extremely refreshing to be able to do something
completely new for a change. And it's had a bonus side-effect for me that I
really didn't anticipate: it's actually helped me to do more quality work
during the week because of these two-day sabbaticals. My mind works so much
better on Monday mornings.

------
zwieback
Jam session. Get a guitar or other instruments and find out what open jams
there are where you live. It's easy to pick up enough skill to strum along and
soon enough you could lead some of your own.

------
shiftb
I work, walk, and sleep. I'm consulting fulltime, working on my startup
fulltime and have another part-time thing so I don't have a lot of free time.
I usually spend weekends working on my startup. When my girlfriend is in town
I relax more and take her out.

Lately I've found myself walking a lot around my neighborhood and riding my
motorcycle to help clear my mind.

Reading this back to myself... it sounds boring, but I love what I'm working
on and feel a pressure to get it out into the world so it doesn't feel boring.

------
lchengify
Whatever you do, find a group. I make it a point to go out at least every
other weekend with a group unrelated to work.

I recommend finding a group for something unrelated to your work but that you
are still passionate about or at least find interesting. For me it's geeking
out about movies and eating morning Dim Sum.

It's also nice that it "pops the bubble" a bit and reminds you that other
people may not interact quite like you do at work. People still poke fun at me
when I say I'll "ping" them about next sunday.

~~~
AndrewWorsnop
absolutely.

------
rluhar
I tend to run, read and just chill out. Most weekdays start at 5 and end at
midnight (work about 12 hours a day, I don't work for a startup, but for
MegaBank here in Japan). So the weekends are spend just forcing myself to slow
down, and try to devote myself to more leisurely pursuits. Recently I made an
inventory of all the half read or unread books lying around in my flat and on
my kindle and am trying to finish as many of them as possible. I am failing!

------
deniscales
I have a family, so my weekends are filled with honey-do lists. Well worth it,
though.

Can you cook? If not, learn. Cook new stuff and invite neighbors over for
dinner and get to know them.

------
ams6110
I have kids, so a big chunk of my weekends tends to be doing stuff with/for
them. There's also shopping, laundry, housecleaning, yardwork... all the
boring normal chores. If I have any energy left I try to read a bit or learn
about something new. I find it difficult to do anything really productive on
the computer over most weekends. Sometimes the stars align and I get a few
quiet hours.

------
WesleyJohnson
Many times I'll take in a movie at the local theater; go shopping for odds and
ends; go window shopping for some cool toys; play a round or two of disc golf;
PS3 (Bad Company 2 mainly); toy around on the keyboard (I can't read music,
but it's fun); bowling once every few months; go for a drive just to clear my
mind. None of them are overly adventurous or anything, but they get me by. :)

------
dstein
As part of my condo fees I have access to a community swimming pool. Last year
I didn't use it even once. Big mistake, it's a wonderful way to spend an
afternoon, either by yourself or with friends. I take my ipod, drinking water,
my comfy lawn chair, and sunscreen and hang out all day long. It's simply
amazing how good you feel after a whole day of sunshine and swimming.

------
molbioguy
Origami! The modern stuff's amazing and so addicting.

If you're reading the compiler book because you love to do that, I don't see
the problem. Free time is for doing anything you want to, as opposed to things
you need to because of obligations. If you love thinking about startups, do
that. Work-life balance only needs to be considered when you _feel_ like all
you do is work.

------
derrida
I live in Sydney, but i've heard there are some hills and beaches in the bay
area. Trail-running in a national park (this weekend), Skiing (last weekend),
Snorkeling off Sydney to see Grey Nurse Sharks (next), Go to a gig and say
'hello' to people (last night).

EDIT: If there are any HN'ers in Sydney that want to partake in these
activities, email me.

------
csomar
If you don't have problems socializing with people, then get out and meet
people. I'm not probably the best one to talk about this. I'm also single, 20
years old, spend all of my time in front of the screen.

I have tried a month ago dating, but that didn't work out and I gave up too
quickly. I'd be interested to know if anyone has a solution for that.

~~~
tdfx
If you're not naturally social you should involve yourself in some activity
that forces interaction with other people. Consider a weekend job at a bar or
popular night spot. If that's not your thing, try finding groups on Meetup
that involves interests you like/might be interested in. Maybe even pick a few
outside your comfort zone.

Very few people have the kind of personality that allows them to naturally
develop friendships with the type of people they prefer to be around. Given
that, it's basically up to you to find activities/work/etc that puts you in
"social proximity" with the kind of people you want to have in your life.

------
sliverstorm
Where do you live? If you are near open spaces / nature preserves, you can go
hiking or camping every weekend. Perhaps go bicycling?

Physical activities are good, they keep you busy and your mind sharp. I have
personally tried to establish a resolve to work myself to pieces on weekends
in some form of activity or another, and it's been paying off.

------
HeyLaughingBoy
I wanted to go fishing, but I need to get my Xterra running again before I can
take my canoe anywhere and it was too hot & humid to work on the truck.

Instead I spent the afternoon in the basement machining a piston and cylinder
for a steam engine I will finish... eventually.

Should have worked on the Xterra instead!

------
toddoh
I usually go outside and taking some photos(I mean not a snap camera. DSLR).
Looks so basic, but it's kinda helpful to achieve work-life balance to me :D I
think if you have to invest to you _a little bit_ for balance, that's
meaningful.

------
impendia
Swing dancing, improv comedy, Buddhist meditation.

The great thing is that they are all very social (and _very_ different from
work) but you don't need friends to do them with, you just show up and enjoy
them with whoever is there.

------
joshmlewis
I design during the week and some for myself on the weekend. Almost always I
go to the mountains, stay with some friends at a small college, and play
guitar. I love it.

------
joeybaker
Fwiw, today was my third hackathon. It's good fun flexing the brain in a way
that's like work and yet not at all related to what you're actually doing.

------
glimcat
Damn. All the "I work on my startup" responses in here are depressing. We need
a startup that's a time-off matchmaker for the startup-obsessed.

------
jrussbowman
Most of my time is spent with my family, I have two small kids. I try to sneak
in some time to work on my personal project unscatter.com

------
vasco
Disregard normal life. Work on your startup.

~~~
Hisoka
I agree. You can work on normal life after your startup is successful. Not
many ppl in life have created a successful startup. Aim to be one of the few,
ordinary can wait..

------
poink
I have a big list of stuff I want to do or learn. I try to use my leisure time
to tackle that list.

------
abrashkin
Meet like-minded people for brunch and have a meaningful conversation at a
coffee shop afterwards.

------
ajray
I build flying robots [<http://diydrones.com/>]

------
dustingetz
try moving to downtown district of a big city, there's a ton more to do than
in the suburbs.

------
jerhewet
Sleep.

Seriously. I sleep.

~~~
kbd
This. Sleep, and sometimes laundry.

------
mmccomb
* Run * Cycle * Swim

Sometimes I combine all three in the reverse order.

------
helwr
reading a book on compilers, seriously, the dragon book, i'm on page 61, "top-
down parsing"

------
js2
<http://www.bahiker.com/>

------
nolite
are you single? Get a girlfriend. That will cure your problem of having too
much free time (or money)

~~~
BCM43
This assumes that the poster is either a straight male or lesbian female.

~~~
nolite
notice I didn't ask about his/her/its preferences..