HNHacker News
TopNewBestAskShowJobs

Eleopteryx

299 karma · joined July 8, 2011

submissionscomments
Eleopteryx··on Lotus, a web framework for Ruby
It's not "completely" silly at all. For "normal" users, it's true that they may never need to do this. It's also a largely "safe" assumption that your site's visitors will have JavaScript enabled.

However there are security concerns when dealing with JavaScript. For example, if you've ever surfed the darknet, disabling JavaScript is highly recommended to avoid present and future exploits that could compromise your anonymity, funds, etc.

Eleopteryx··on Lotus, a web framework for Ruby
I think I was misunderstood. By de-demotivation I meant re-motivation :)
Eleopteryx··on Lotus, a web framework for Ruby
I really liked Merb, and stuck by it for some time. Rails 3 was supposed to be Merb 2. It wasn't really, but Merb was still lost to the "merge".
Eleopteryx··on Lotus, a web framework for Ruby
Thanks for the de-demotivation.
Eleopteryx··on Lotus, a web framework for Ruby
I'd be OK with that.
Eleopteryx··on Lotus, a web framework for Ruby
This is depressingly similar to what I was aiming for when I recently began work on: https://github.com/lean-framework/lean (I feel like this happens to me a lot.)

Rails controllers are hard to test because actions aren't designed to be testable objects.

ActiveRecord models become monolithic because there's no separation of instantiation, validation, persistence, or retrieval.

I originally experimented with building a Rails app that forgoes ActiveRecord to a large extent; using plain Ruby classes + Virtus gem to separate the aforementioned concerns depending on context.

I was pretty satisfied with the number of design headaches I was able to avoid, which is when I started to create a framework around the aforementioned paradigms.

Not sure if I just lost my motivation or not, but I'm glad I'm not alone.

Eleopteryx··on Bitcoin Value Sinks After Chinese Exchange Move
I feel that the moon bases analogy is incredibly unfair. Bitcoin's utility has already been demonstrated, and, through that, the utility of decentralized digital currency in general. The remaining question isn't so much the long-term viability of this model as much as it is how far can it go?

Comparing it to the notion of a "moon base" is extreme on multiple levels, I guess one of them being that the actual demand for such is clearly minimal where as Bitcoin's adoption continues.

Bitcoin being banned by someone somewhere was a wholly inevitable and arguably necessary outcome. The positive spin on this news is that Bitcoin is on the radar at all to even be banned by anyone to begin with.

Eleopteryx··on Bitcoins stolen from the users of Sheep Market Place?
He's probably referring to marijuana, and there's numerous studies that would both support and contradict that notion.

Anything consumed in excess can be harmful in the short-term and long-term, including food, water, or oxygen.

Eleopteryx··on We're creating a culture of distraction
A few months ago, I had a brief exchange over Twitter with an artist from perhaps my favorite band:

https://twitter.com/edwarddroste/status/343418176454926337

"Maybe they're trying to catch your latest tweet?" was the reply that I wanted to send, but I didn't want to come off as cheeky to someone I revered.

Is the article not a distraction in itself? Sure enough, I came upon it this morning while I was browsing Twitter from my bed. The article itself is over 2000 words long; some of those words being a transcript from a 15 minute video. Now here I am commenting on it; taking up additional time from my day to formulate these points rather than attending to other things; reinforcing the dissonant relevance and irony of the points that the article is making. This article on distraction is a distraction in itself, and my viewership was predicated on finding it on a distracting service used from a distracting device. I found it and read it because I didn't have anything subjectively better to do at the time.

I'm OK with this.

Eleopteryx··on Poll: How many Bitcoins do you have?
Life is a gamble. Hide in the house or accept that you might fall off the bike and scrape your knees once in a while.
Eleopteryx··on Poll: How many Bitcoins do you have?
Mining isn't free. You will need to purchase hardware if you want to mine in a capacity that's actually profitable. If those coins depreciate, then all that mining is for naught, same as if you had bought them with cash.

If you want to get by with the hardware you already own, look into Litecoin mining, then sell those Litecoins for cash or Bitcoin. Mt.Gox will support Litecoin transactions (indeterminate ETA).

Honestly I think the easiest path is to just buy coins and hope they continue to appreciate. I remember not too long ago buying a few when they were in their ~$90s USD, and then regretting buying them at that "high" price. Now it's more than doubled.

Eleopteryx··on Rails has Two Default Stacks
I agree. I don't see how slim isn't in every way better than Haml.
Eleopteryx··on Programming as a cure for A.D.D.?
Nevertheless, being unable to maintain focus on activities that are not enjoyable/easy is a diagnostic criteria for inattentive ADHD.

Whatever the case, categorizing these symptoms into a disorder is rather inconsequential to the fact that taking Adderall has generally improved my quality of life. I honestly don't know if I'd be able to keep my job without it.

Eleopteryx··on Programming as a cure for A.D.D.?
I do my best work when I take stimulant medication. I simply do not get as much done without it, and even then I find it can be ineffective. With programming I often lose track of what I'm doing and end up off task without even realizing it. I can have a low tolerance for working on things that do not interest me, finding it almost physically impossible to apply myself. Somehow amphetamine salts make me feel more engaged with things I might otherwise find dull.

I should note that I was tested for ADHD and the results indicated that I actually didn't have it, even though the symptoms of inattentive ADHD seem to describe me perfectly.

Eleopteryx··on IPhone done entirely in CSS3
This and the seeing the Twitter logo done in CSS is inspiring. I seek to create my own images using CSS3.
Eleopteryx··on Dear Github, please fix the Watch-Button
I don't even really look at my feed. There's way too much going on in it for me to really keep track. I basically "watch" repos to bookmark them. "This might be useful in a project at some point; let me make sure I can find it later." Currently watching 92 repositories.
Eleopteryx··on The Sun is Setting on Rails-style MVC Frameworks
Here's my anecdote:

1. I dumped view helpers for decorators (namely, the Draper gem). I got rid of complex logic in my view templates. Most of the logic I need in my views is transformed object properties. I need a date to appear as mm/dd/yy. I need a filesize in bytes to appear as KB/MB. I want a comment formatted as Markdown to be HTML. So now I'll decorate my objects so I have a nice post.formatted_date instead of needing to write the helper formatted_date(post). At worst I have some conditional statements in my views looking for the existence of a property. CSS also comes into play; the :empty selector allows me to cheat in some cases.

2. I write my view templates in a JavaScript templating language. I am a fan of slim for Ruby, so I went with Jade for JavaScript. I use therubyracer to call on these precompiled templates within Ruby itself, and render them like anything else. I then go on to use these same templates client-side. The reason why I abandoned view helpers to a large extent is because of this. Any logic that I need within a template would have to be duplicated server-side and client-side, which is antithetical to the goal. For my use-cases I've been able to do this successfully. It requires an adjustment to mindset, but is feasible. And really, my templates are a lot cleaner now than they've ever been.

3. When a user lands on a page, they get rendered HTML. Subsequent requests use AJAX and JSON responses to load things dynamically from there. Best of both worlds. Also, users who have JavaScript disabled can use the site albeit with not as much slickness.

4. Using to_json is hell; don't do it. I use the RABL gem for assembling my JSON, and use the same decorated objects. In the case of JSON, depending on your API, you might want to include say an ISO8601 date as well as a formatted date. Not a big deal, just vaguely duplicative.

The downside was how much code I had to write for myself. Using JavaScript templates was a biggy. But this is something that could probably be packaged as a gem, if I or someone else took the time. The framework (in my case, Padrino) still provides lots of tools that I need. Ruby ORMs are a big part of this.

There's still the issue of duplicative routes. I have routes defined in the app itself, and then within my JavaScript framework (currently Spine, but previously Backbone) I have to hardcode these same routes. I don't like this, however, routes are probably the last thing to change in my app if I put any thought into them ahead of time. This is something that requires additional thought, but I'm thinking there should be a way to get my app routes available client-side.

Eleopteryx··on Facebook Is Using You
I thought this was old news? Really old news.
Eleopteryx··on Ruby Frameworks? Which one? Bye bye Rails.
What even constitutes as a "small" or "large" application?

My current Padrino project is around 2000 LOC, excluding tests. As it has grown more complex, I've broken off larger parts of its functionality into smaller apps within the same project. These apps share some resources -- particularly models -- but in terms of controllers and helpers, they are very much distinct in their roles in the overarching project.

Padrino has changed my mindset on how I approach large projects. Instead of trying to create something massive in itself, I logically separate key parts of the overarching app into smaller apps mounted within the same project.

I question the entire concept of a "large app". When classes are too large, methods are too long, it's generally considered to be sub-optimal code, or poor design, and there's a point where one is expected to break these things down into smaller pieces. Why does this concept not apply to our web apps?

Eleopteryx··on Ruby Frameworks? Which one? Bye bye Rails.
>Padrino’s best bet is to appeal to a younger, fresher group of programmers who haven’t spent years learning Rails

Anecdotal contradiction incoming. I started with Rails years and years ago (can't even remember when). I moved to Merb when Merb was the new hotness because I preferred it's modular approach. After Merb was "merged" (i.e. a few of its philosophies were put into Rails and Merb died due to lack of development), I caught on to Padrino and was impressed by it for the same reasons I was impressed by Merb. I program in Rails for a living but use Padrino for my personal projects.

I actually think a potential knock against Padrino is that it's not quite as easy to get into as Rails. When I got into Rails, it was all "create a blog in five minutes" which is what attracted me to it. There was a point where I didn't even understand the distinction between Ruby/Rails -- it was just one big scripting language to my PHP-addled mind. I think Padrino (or even just plain Sinatra) has a slightly steeper learning curve; but it's hard for me to comment on that necessarily because I am no longer a beginner and my perspective is a lot different.

Eleopteryx··on Padrino 0.10.0 Released Rubinius support, speed and much more Check it out
I use Padrino exclusively now; it does everything I need while also being lightweight, fast, and modular.

Since I haven't played with Rails since 3 was in beta, I'm genuinely curious: from a purely technical standpoint, for what types of projects might Rails be a better choice than Padrino?

← PreviousPage 5 of 5