HNHacker News
TopNewBestAskShowJobs

daniel-levin

870 karma · joined December 8, 2012

submissionscomments
daniel-levin··on [dead]
I like the idea. However, the website is poorly executed because it took me too long to figure out what it is you guys do.

"On Webshell you write scripts in the API Editor and once pushed on Webshell's server, you can call them as a new API" is just not descriptive enough because it says nothing about integrating/aggregating multiple APIs through the Webshell API.

Poor spelling and grammar only made understanding harder. That said, the product is impressive. Let me also point out to those that missed it, the project is open source [1]. I just hope the creators add a licence file - because IIRC you can't just appropriate source code without a licence.

On a side note, I really like this other service called Zapier [2] that makes "your service talk to others".

[1] https://github.com/webshell/APIs [2] https://zapier.com/

daniel-levin··on What I learned from time away from the Internet and email
On a tangent, one thing that caught my eye is: "or February, my wife and I are trying a gluten-free, wheat-free month to see what that’s like."

In my opinion, this is one of the highest-leverage lifestyle modifications you can make. I started this in September 2012. In short, it helps with (chronic) rhinitis management - my sinuses are blocked less often and I am congested less frequently. Even though wheat-based foods aren't inherently much more calorific than others, I have found that my net caloric intake has been reduced by avoiding wheat-based foods. I replaced wheat-based foods with higher quality foods - like brown rice. Using this in conjunction with regular exercise, I have become healthier, more energised and motivated.

Starting a cycle of being healthy (exercising, eating correctly) initialises a self-sustaining feedback loop of motivation: once I started to see results (improved body composition, feeling more energetic) I became even more dedicated to this cycle of living healthily. Ceasing to eat gluten-based foods catalysed this for me.

daniel-levin··on We don't know why lithium batteries work
> Still no one knows what chemical process yields this material, what is this material, and why a small structural change in the electrolyte makes such a colossal difference in the performance

I read this an immediately saw a parallel with computer science. To quote from CLRS: [1] "Computer scientists are intrigued by how a small change to the problem statement can cause a big change in the efficiency of the best known algorithm". It strikes me as incredible how seemingly simple concepts can be the tip of a much bigger iceberg of complexity. Another example of this would be the proof of Fermat's Last Theorem [2] . A proposition one can understand with primary school mathematics, whose proof eluded mathematicians for centuries and required the invention of new mathematics. Sir Andrew Wiles, the person who proved the proposition, had to see deep symmetries between a plethora of domains in mathematics. The main idea that I find remarkable is the incredible complexity of the world in which we live - even the smallest of changes to a concept we think we understand (Electrochemistry, Algorithms, Mathematics), can redirect the trajectory of our understanding completely. To me, this seems as if we have only the most superficial understanding of the myriad structures and substructures of the universe. New developments in all areas of science excite me greatly purely because our understanding has been advanced that infinitesimally bit more.

[1] http://en.wikipedia.org/wiki/Introduction_to_Algorithms [2] http://en.wikipedia.org/wiki/Fermat%27s_Last_Theorem

daniel-levin··on Where the logic hides in rails apps
I like the idea of one-class-one-responsibility but have a number of questions:

1) Isn't the whole idea of ActiveRecord that persistence is hidden from the model programmer? Surely the model doesn't actually have 'triple duty' because it doesn't contain any persistence code?

"Imagine you are a brand new developer on the team that supports this app. You see the @contact.save call but now, the fact that it performs business logic is even harder to see, since the logic is placed in another module, somewhere in some other directory." - I will imagine I am a new developer on the project:

2) My expectations have been subverted. My understanding of Rails conventions is that business logic does live inside the model which will be inside app/models. Therefore, the first question I'd ask myself would be: "What business logic happens when this an instance of this model is created?" Surely Rails supports this paradigm by virtue of the existence of after_create? Wouldn't I have to visit a third class in non-obvious location to understand the updated example(app/use_cases)?

3) Doesn't CreatesContact now have two responsibilities as well? Namely Creation and validation? And the name doesn't communicate that it performs validation as well, does it?

4) Doesn't creating this new class exacerbate the problem of code/logic being 'scattered all over the place'?

5.1) Doesn't the issue of: "[In the controller], To an outside observer, it is not entirely clear that an email will be sent." remain just as problematic as the model containing the code for sending the email? Because you'd have to mentally context switch (the single biggest obstacle to understanding code IMHO) from the controller to the CreatesContact class to see what is happening. when CreatesContact.new(@contact).create_contact! is called.

5.2) Continuing the thread of the last question, CreatesContact.new(@contact).create_contact! certainly doesn't say to the programmer: "I send an email if a certain flag was checked". Isn't this unintentionally self-defeating? The aim is a reduction of 'obfuscation', but isn't hiding what a 'single-responsibility' class actually does obfuscation itself?

I don't mean to be dismissive, but, broadly, I disagree with the way you have tried to compartmentalise this application. The purpose of my questions is to help me understand your opinion.

daniel-levin··on Evidence suggesting that young computer programmers have “bilingual brains”
I have no concrete evidence; here be anecdotes:

When I'm speaking a foreign language, I conceptualise what I want to say - language invariant, then find the correct words, and arrange them so what I say or write is grammatically correct. Sufficiently proficient (fluent or close to) speakers of a foreign language don't try convert their native tongue to a foreign one. I can personally attest that this doesn't work - idiomatic expressions and cultural markers do not correspond (for example, 'yellow' connotes drunkenness in some languages; not English). The point is that multilingual people have developed the ability to take what they want to say, as a set of concepts, and convert them to words in the language of their choosing at that moment. Try to think of it as analogous to how a compiler takes an AST (concepts in natural language) and traverses it to produce machine code (foreign language) specific to a processor architecture.

Learning a third language is easier than learning a second because your brain adjusts to become less tightly coupled to the words and phrases you already know. Having studied Hebrew, I have learned to communicate without the verb 'to be', 'have' (the equivalent is literally 'there is to me'), and indefinite articles (a, an). There is also a preposition (את) that I don't know an equivalent of in any other language.

It is my opinion that multilingual people have developed the ability to express their necessarily-not-yet-explicated thoughts (concepts and ideas) in the language of their choosing. Correspondingly, programming languages are a medium for expressing the programmer's ideas about computation. When I'm programming, I'm thinking about concepts, not language specifics, for example "abstract this segment of code to a function" can become

def removeVowels(target):

    ...
string removeVowels(String target) {

...

}

removeVowels :: string -> string

removeVowels target = ...

I don't think of language specific syntax. I have an idea about computation and express it using the idioms and syntactic features at my disposal. Further examples:

In English, when asking for permission, one would say, "May I.../Can I...", whereas in Hebrew one will often say אפשר - which translates to 'possible to [infinitive] ...'. Similarly, in the above example, the python approach might be:

for ch in target: non indexed iterator

Curly brace type language:

for (int i = 0; i < target.length(); i++) { }

Haskell:

map consonantOrNothingFunction target

but all of these approaches yield the same computational result even though fundamentally different in structure and nature. A good polyglot has detached their language facility from their conceptualisation faculties. I certainly think I have. Multilingualism fosters this detachment, making programming easier.

edit: code sample formatting

daniel-levin··on How would I get started?
Sure, totally agree, but a consensus by verified posters was more of what I was aiming for
daniel-levin··on How would I get started?
What is 'the current state of the art'? Note that I am a total dilettante in the area of machine learning/NLP.

And why couldn't the top k HN users (patio11 et al) be given the option to classify comments {dismissive; troll; shallow-cheering; ...;} and this human classification could be the training set of a supervised learning system that could use NLP algorithms to derive useful metrics. Simplistic example: dismissive word ('sucks'; 'never work', 'impossible') density correlating to something that has been flagged as dismissive. Or is this an impossibility? Again, I do not have the hands on knowledge to be able to call this one.

daniel-levin··on How would I get started?
Speaking of ambitious ideas and 'middlebrow dismissal', I'd like to see the algorithmic dismissal detector that PG wrote about. I'm sure the denizens of HN know a thing or two about computational linguistics. Is this sort of thing (algorithmic detection of middlebrow dismissals) possible?
← PreviousPage 7 of 7