HN user

scardine

1,990 karma

[ my public key: https://keybase.io/scardine; my proof: https://keybase.io/scardine/sigs/qeBpi0HYlFKHREYPh9n-xmWcbtfL4QLbtHsGFGzGD2g ]

Posts21
Comments577
View on HN
meta.stackexchange.com 6y ago

On the way to being the most downvoted post ever on StackOverflow:Meta

scardine
99pts101
devblogs.microsoft.com 6y ago

What’s New for WSL in Build 18945

scardine
2pts0
www.boston25news.com 7y ago

The Moon Is Shrinking

scardine
1pts0
www.reddit.com 8y ago

Fast, asynchronous and sexy Python web framework

scardine
1pts0
news.ycombinator.com 8y ago

Netflix email campaign for the Punisher show

scardine
1pts0
github.com 9y ago

A Django template for using Flask for the front end, Django for the back end

scardine
1pts0
medium.com 9y ago

Clever phishing scam of the day

scardine
1pts0
futurism.com 9y ago

New, Groundbreaking Revelation Brings Us Closer to Nuclear Fusion

scardine
3pts0
cloudatcost.com 10y ago

Pay $35 once and get a VPS for life: too good to be true?

scardine
9pts13
news.ycombinator.com 10y ago

Ask HN: Do you attend Hackathons?

scardine
10pts13
medium.com 11y ago

How a Single Prediction Changed the Future of Computing

scardine
2pts0
medium.com 11y ago

Want a better pitch? Watch Elon Musk’s presentation for the Tesla Powerwall

scardine
133pts37
news.ycombinator.com 11y ago

Ask HN: Best strategy for mix-and-match at hackathons

scardine
2pts1
github.com 11y ago

I'm 43 and had my first hackathon this weekend: lessons learned

scardine
2pts0
aurelia.io 11y ago

New JavaScript framework from former Angular developers

scardine
13pts4
news.ycombinator.com 11y ago

Digital Ocean will start charging for Backups

scardine
1pts0
www.youtube.com 11y ago

Meet “ELO”, a Special Teddy Bear from Amaral Carvalho Hospital in Brazil

scardine
1pts0
computerworld.com.br 11y ago

Brazilian 50% tax over foreign datacenters services

scardine
2pts0
www.zenhub.io 12y ago

Gitub issue manager meets trello

scardine
4pts1
buildbot.pypy.org 12y ago

How much of numpy can you use in pypy?

scardine
1pts0
docs.google.com 12y ago

Offset: Goroutines ported to Python

scardine
28pts12

I guess you can have heated lens just like you have heated mirrors (I'm living in Brazil so I don't have this problem).

I like to use darker film in side windows, but it makes hard to use the side mirrors at night, I would love to replace them with cameras.

Things like night mode and anti-glare would be pretty cool as well.

Right after finishing Electronics vocational school I spent the next year working as an intern at Unicamp (Campinas University in Brazil). The job was at the computer lab of the School of Electrical and Computer Engineering[1]. This was before ethernet (yeah, I' that old), so dumb terminals were linked to the CPUs through RS-232 cables - when I was not burning my fingertips soldering DB-25 connectors I was tinkering with every computer I could get my hands on.

I saw /etc/passwd and asked my boss how to decrypt the passwords. He told me it was a one-way encryption, so the login program would just encrypt the password you provided and compare to the encrypted value. He went on explaining the old crypt algorithm and even made a bet I could not guess his password. He said it was related to a movie.

So at 17 I was hooked and started studying the sources. In the end I just patched and recompiled the passwd binary to store clean text passwords in a hidden file. Later I learned this was called a trojan horse.

And even now, 30 years later, I remember his face when I told the movie was Citizen Kane and his password was "rosebud".

Thank you Miguel and Gorgonio for teaching me about C and Unix! This knowledge paid my rent for 3 decades and I still love the job.

[1] http://www.internationaloffice.unicamp.br/english/teaching/g...

[2] https://en.wikipedia.org/wiki/RS-232

It is a catch 22: unless you are spending at least half your time prospecting new clients it is hard to keep a steady income, but it is hard to invest that much time in the commercial side of your "one man show" if you are not charging high enough.

Every beginner underestimate how much salesmanship it takes to run a successful freelancer career.

It may come as a surprise, but neurotypical people also show stereotypical movements (stereotypy is the term used formally in scientific literature for this behavior).

There is a neural pathway that triggers this to occur in about any human, under the right circumstances - just watch anyone doing something that demands deep focus or concentration combined with fine motor skills.

For example, watch a musician or a someone playing videogame and you can identify motor stereotypical moves in the facial muscles (specially tongue/mouth/jaw).

The stereotypical moves in autistic persons tend to be very characteristic and are easy to spot if you have a trained eye.

So don't worry about moving your toes in patterns or jiggling your leg while you are coding, it is perfectly normal.

Open-Source Seeds 7 years ago

I'm OK with GMO products, what I hate is:

* GMO that don't produce viable seeds so I have to buy seeds from you every season.

* GMO that only works with some other supply available only from the same provider (think of a car that only works with gas from Ford).

* Patents on living organisms: a farmer should be allowed to plant the seeds they grew in their own farm, produce hybrids and so on, without paying royalties.

* If GMO strains get accidentally cross-pollinated from a neighbor farm you should not be on the hook for it.

Python is kind of a strange beast - definitely imperative but with some FP-ish features: functions first-class citizenship, list comprehensions, generator functions/expressions (and there is the functools module). It is gaining more and more native immutable collections with each release. This multi-paradigm approach is what makes it one of the best glue-languages out there.

Python lacks tail call optimizations and recursion dept is limited to ~1000, so if your algorithm is not O(log n) or better you may have to convert from recursive to iterative (there is a recipe that makes conversion trivial) but other than that I'm content with its FP-style features.

Have you tried Python's SQLAlchemy, the ORM parent posts are praising? The `sqlalchemy.sql` module is awesome and pretty much maps 1:1 to raw SQL.

Composing SQL expressions using this library instead of using string interpolation/concatenation has several advantages:

* DRY and composition * safety * portability (if you have switch the underlying DBMS)

Often the result is as good or better than my raw SQL. The fact that Python has an amazing REPL makes the process pretty much like testing queries in the database prompt but with less cognitive switch between languages.

In the end it is a matter of taste, but I have to agree with parent posts, SQLAlchemy raises the bar for other ORMs.

I just finished reading the "Mars Trilogy" by Kim Stanley Robson where there is a tension between the "red" and "green" parties (first group want to keep Mars pristine, the other want to terraform it). The reds even sabotaged Mars space elevator in order to slow down emigration.

I guess it will be like Antarctica, where several countries made territorial claims[1] over it, many of them overlapping.

The UN's 1984 Moon Treaty[2] is dead letter - it has never been defied but is defunct in practice as none of the most prominent space-faring nations have ratified it.

If someone settles in the Moon you can refute their claims over territory there but what else can you do? Set an embargo? Send a military force and try to kick them out? Nuke them? Someone with knowledge and resources to colonize that desolated rock in space is not an adversary to be underestimated...

[1] http://www.antarctica.gov.au/about-antarctica/people-in-anta... [2] http://disarmament.un.org/treaties/t/moon

The moon has ideal conditions for solar energy harvesting: no atmosphere, no weather...

Since Project Apollo in the 1970s it is known that all the materials needed for manufacturing photovoltaic cells are present in lunar rocks and dust. Not saying it is an easy engineering feat, but the raw materials are there.

In Brazil there is a concept called Business Entity Disregarding (Desconsideração da Personalidade Jurídica) that can get both ways: make partners liable for company debts or companies liable for partner debts. It can be triggered when the plaintiff engaged in some kind of asset hiding fraud or there are substantial confusion regarding company/personal assets.

As I understood, once you hire someone in France the labor code makes it virtually impossible to terminate the contract.

In Brazil employers have to pay a fine if they fire a worker without a "fair cause" (~ 3.2% over the sum of all compensation paid to the employee while they worked for you), so the longer someone worked for you the more expensive it gets to fire them.

Interesting, in Brazil all the companies in the chain are liable in a labor-related law suit. Before the 2017 Labor Reform[1], frivolous law suits by former employees were a billionaire market because it used to be a risk-free gamble - after the reform the litigant is liable for exaggerated claims and there was a 46% drop in labor cases[2].

When I look at any market where the labor code is excessively protective, I see high unemployment rates specially among the young - Brazil, Spain, France[3]... I don't know about causation but clearly there is a correlation between employee over-protection and unemployment rates. I think it is the law of unintended consequences[4] in action: the legislator intention was good (protecting employee) but the net result is negative.

[1] https://www.jonesday.com/en/insights/2017/12/brazilian-labor...

[2] https://www.capital-ges.com/an-insider-view-of-the-brazilian...

[3] https://countryeconomy.com/unemployment

[4] https://en.wikipedia.org/wiki/Unintended_consequences

If you run a terminal multiplexer like byobu you may want to run it only for the ssh connection, not for every sub-shell (otherwise you may get a warning about running a multiplexer inside another multiplexer session).

It is like JavaScript: I don't hate JS itself, I hate spaghetti-code people write with it (but I do hate automatic type casting).

I don't hate C, I hate dangling pointers and buffer overruns.

I don't hate OOP, I hate over-engineered class hierarchies, state hiding and leaky abstractions.

I don't hate FP, I hate when people write a new undocumented DSL for each project just because "it is so easy in an expressive language like X".

Sound reasons but there is nothing preventing you to adopt this pattern with Jinja. :-)

I'm glad that Jinja2 templates are now first-class citizens in Django as I care about performance and don't feel like patronizing template designers with a carefully handicapped template language.

It is a design decision from a time where the general belief was that template designers played in a lower league compared to "real" software developers.

It is 2019 and personally I see no reason to think professional template designers will shoot themselves in the foot if we give them too much power. We are all consenting adults...

Also, you don't get much by switching Django templates to Jinja.

Well, you gain a lot of performance - as much as 10x depending on the complexity of your template. Also, Jinja is a lot less crippled than Django Templates (for example, you can't call a function/method with parameters in Django Templates).

A candidate might reasonably assume that they can look better than the other candidates by spending more time on the problem

The same is true with a take-home, candidates see the (often underestimated) statement "this should not take more than X hours" and assume they will have a better shot if the invest more than the X hours.

I forgot to mention that we also accept past contributions - in the end the hypothetical candidate can spread this 60 hours investment over any other hiring processes using the same method.

I'm thinking about writing a "social code challenge manifesto".

Exactly, many people complain about about not being hired because they lack experience and they can't build experience if they are not hired.

My advice is always "build experience contributing to FOSS projects in your spare time".

We are pushing the envelope and often find bugs or lacking features. I want to hire people that can fix/implement those and send the PRs upstream instead of nagging the project maintainers.

My companies do something a bit different: we ask people to pick any issue from any opensource project in our tech stack and try to land a patch closing it.

We think this is better then wasting the candidate's time on a toy project - at least the can write off their time on the opensource-karma account.

Also, we can check not only their code but also their communication style and other skills that matter in the real world (projects on our tech stack have a high threshold for documentation, unit tests and other stuff that matters).

We call it "social code challenge" and it is working wonderfully for our recruiting process.

Well, regarding South America there is a generation that grew up reading "Open Veins of Latin America: Five Centuries of the Pillage of a Continent" (even the author Eduardo Galeano has criticized his own work).

Blaming all the region problems on the "imperialists" and stuff like that is a line of thought still very alive and kicking around here - it is way easier to blame some imaginary entity than taking responsibility for your present situation. It is very inline with the current "outrage porn" culture.

[1] https://www.amazon.com/Open-Veins-Latin-America-Centuries/dp...

I have not touched PHP in the last 10 years but if memory serves it also has the ternary operator. Ok, lets try it:

    $ php -a
    Interactive mode enabled
    php > echo 1 == 1 ? "foo" : "bar";
    foo
    php > echo 1 == 2 ? "foo" : "bar";
    bar
Looks like javascript has it too:
    1 == 1 ? "foo" : "bar"
    "foo"
    1 == 2 ? "foo" : "bar"
    "bar"