HNHacker News
TopNewBestAskShowJobs

fbonetti

1,018 karma · joined May 1, 2015

submissionscomments
fbonetti··on Recharts – A composable charting library built on React components
I'm really confused by this comment. Unless I'm missing something about this specific library, if you pass new a new `data` prop to the chart, it will re-render, so live data is the same as any other data. This is true for any react component.
fbonetti··on Silicon Valley’s geeks are trying to turn themselves into jocks
Except it's in the Economist. Bizarre.
fbonetti··on The Dreaded Weekly Status Email
> Or sometimes you just really don't care.

Agreed. Hearing about the minutiae about someone's task is tedious. To me the daily scrum is like getting home and asking your significant other "how was work today?". Boring question, boring answer.

I definitely prefer the asynchronous approach. That way if I don't care about what you're working on (or vice versa), we don't need to waste time standing in a room together.

fbonetti··on Don't add your 2 cents
Still passive aggressive. Any person with a brain would see right through that question. If you need to address something, it's better to be direct than to beat around the bush.
fbonetti··on Goodbye, Object Oriented Programming
> It forces your whole project into a box

Isn't that the point? Since Elm is a pure, strongly typed language, it introduces a lot of constraints. You can't mutate anything, there are no side effects (only declared effects captured by the type system), and the only architecture you can use is "The Elm Architecture". However, those restrictions will keep your code sane and the compiler almost guarantees that your code will work. It's a pretty fair trade-off if you ask me.

fbonetti··on Goodbye, Object Oriented Programming
Well he did leave an ellipsis at the end of the sentence, implying that the list isn't exhaustive. He could have many more grand titles and occupations. His headshot is also a Jobs-esque, black and white photograph of him wearing a black shirt. This must be satire, right?
fbonetti··on Goodbye, Object Oriented Programming
> For instance I have yet to see an easy and simple to use (and as such maintainable) functional widget and gui library.

I will continue to shill for Elm[1], like I always do.

[1] http://elm-lang.org/

fbonetti··on How Humble Bundle stops online fraud
Oh wow you're right. How bizarre.
fbonetti··on How Humble Bundle stops online fraud
Only vizza and antonplus posted the same verbatim comment. Could just be the same person, different accounts. The accounts were created a long time ago as well. Doesn't look like shilling.
fbonetti··on Ruby Web Dev The Other Way
Totally anecdotal, but the past two startups I worked at used Rails on greenfield projects.

The first one decided to go "off the rails" and made up their own architecture based on Uncle Bob's SOLID design principles or whatever. We weren't allowed to use ActiveRecord, which is a huge part of how you handle domain logic, validations, relationships, cascading deletes, and data consistency in Rails. Instead of ActiveRecord Models, we had `repository` classes which basically had a bunch of raw SQL queries, we had `interactor` classes to handle all of our domain logic, and our controllers were just called `interactor` methods and returned the result.

The general architectural ideas came from a good place, but going that hard against the "Rails way" made basics tasks extremely difficult. We couldn't use any external Rails gems because our architecture violated the basic assumptions that gem authors made. We had to hand roll all of our validation logic because we couldn't use ActiveRecord. Our DB raised non-NULL exceptions all over the place because people would forget to validate certain fields, or didn't know that certain fields were required because there was no model class to clearly articulate the schema. After just 6 months the code was already a mess.

The other company I worked for embraced the "Rails way" completely. The code base accumulated a ton of technical debt and general jankiness along the way, mostly due to constantly changing business logic and integration with 3rd party services like Salesforce, but the code base was surprisingly easy to work with. The company shuffled people to different teams a lot and it wasn't that hard to onboard new devs into a given project.

What I'm trying to say in a very long-form way is that Rails, when used as it was intended, works pretty well for medium to medium-large projects. You just have to do what the framework wants you to do. It might seem restrictive, magical, or maybe even stupid, but it will prevent a lot of confusion and pain. If you really dislike the Rails ideology, it's better to just avoid the framework entirely.

fbonetti··on When a crow dies, the other crows investigate the cause of death (2015)
The image of the researcher wearing a mask and holding a dead crow is absolutely terrifying:

http://i.dailymail.co.uk/i/pix/2015/10/03/00/2D0746BE0000057...

fbonetti··on Code Is Never “Perfect”, Code Is Only Ever “Good Enough”
That's really cool! Btw, I'd love to drop that line into casual conversation some time. "Anscombe's quartet" has a nice flow to it.
fbonetti··on Pack Hunters of the Silicon Savannas
I definitely got a Michael O. Church vibe from this article.
fbonetti··on React: Mixins Considered Harmful
Floating point error, present in every language that uses floats. This is in no way unique to JavaScript.
fbonetti··on Real Viking Ship Completes North Atlantic Crossing
This is really cool. That voyage must be pretty brutal compared to modern sailing vessels - if you look at this video [1], the galley is basically a sink with a tarp over it :). I wonder if the ship has an inboard engine or a GPS for safety reasons. I imagine that turning this thing around in a crew overboard scenario would be pretty much impossible with a square-rigged sail and no engine.

[1] http://www.drakenexpeditionamerica.com/2016/06/07/cooking-on...

fbonetti··on What ORMs have taught me: just learn SQL (2014)
Yes
fbonetti··on What ORMs have taught me: just learn SQL (2014)
You're totally right. My example is an inner join. I will admit that doing outer joins in ActiveRecord is quite painful. Here's a more realistic example, which is not nearly as pretty:

  Post.select("posts.*, COUNT(comments.*) AS comments_count").joins("LEFT JOIN comments ON comments.post_id = posts.id").group(:comments)
fbonetti··on What ORMs have taught me: just learn SQL (2014)
That's really easy.

    Post.select("posts.*, count(comments.*) as comments_count").joins(:comments)
fbonetti··on Hyperinflation in America: The End of Grades?
Software is essentially a luxury item though. I know that we engineers like to think we're the gods of the universe, but nobody needs software to survive. People survived just fine without software for literally all of human history.
fbonetti··on Integrating Elm and Phoenix Channels via Elm-Phoenix-socket
I hear this criticism about ports a lot. Out of curiosity, how could we make it better? Do you have any examples of what you consider to be the ideal FFI? I haven't used ports a ton, but I have used them for interop between Elm and the Google Maps Javascript API, and I didn't think it was that bad.
fbonetti··on Integrating Elm and Phoenix Channels via Elm-Phoenix-socket
Author of elm-phoenix-socket[1] here. I'm happy to answer any questions about the library, Elm, or whatever.

[1] https://github.com/fbonetti/elm-phoenix-socket

fbonetti··on Ask HN: Freelancer? Seeking freelancer? (June 2016)
SEEKING WORK - Chicago, IL - REMOTE

Email: frank.r.bonetti at gmail dot com

I'm a full-stack web developer with 4+ years of experience. I specialize in React.js, Ruby on Rails, Firebase, CSS, MySQL, and PostgreSQL. I'm also an avid proponent of the Elm language and frequently contribute to open source. You can view my github profile here:

https://github.com/fbonetti

I pretty much exclusively work with startups and I excel at building new products from scratch. Aside from the dev work I do, I also work with my clients to help them build the right product to fit their needs.

Full skill set:

Languages: Ruby, Javascript (ES5 and ES6), SQL, Elm, Haskell Databases: PostgreSQL, Firebase, MySQL, Rethinkdb Frameworks: React (with Redux), Ruby on Rails, Express, Phoenix Other: Socket.io, websockets, Redis

fbonetti··on Drop jQuery as a dependency from Rails
React's server-side rendering solves the blank page issue.
fbonetti··on React Tutorial: Cloning Yelp
The problem with the massive amount of churn is that it just doesn't pay off to learn the new, cool thing when it's going to be obsolete in 3 months or less. I think all programmers, especially ones who read HN, like to learn new things. It's fun to pick up new languages, learn new paradigms, and experiment with different technologies.

What's not fun is learning 10 different ways to handle promises, 4 different build tools, several frameworks, and dozens of new libraries over the course of a year just to keep up. By the time you reach a level of mastery over one of these tools, it's already been replaced by something else! I mean it's great that the tools are getting better, but it's really painful to deal with the constant churn.

/rant

fbonetti··on React Tutorial: Cloning Yelp
This is why I'm so gung ho about Elm.

To create a proper React single page app, you need React, Redux, lodash, react-router, webpack, Immutable.js, babel, npm, redux-thunk, isomorphic-fetch, webpack-hot-middleware, and ton of boilerplate and configuration (which everyone does differently). You can try to assemble this yourself, or choose one of hundreds of starter projects on Github.

A comparable Elm app is a lot simpler. It consists of Elm, a router such as elm-transit-router, and maybe webpack if you want to watch and minify your compiled javascript. Especially now with the new 0.17, Elm forces you to use the standard Elm Architecture, so you don't waste any time thinking about how to structure your app and there's very little boilerplate as a result. On top of this, Elm is statically typed, functional, and simply a joy to work with.

fbonetti··on After reading “Rails is yesterday’s software”, I need to reply
For me personally, one of the coolest features of Phoenix is that it natively supports concurrency. Communicating with a front-end via websockets is really easy to do with Phoenix, whereas in Rails it's basically unheard of. I know that Rails 5 is going to introduce ActionCable and that it's possible to write event-based apps with EventMachine, but these are ultimately poor solutions compared to what's capable in languages that take concurrency seriously (like Elixir).
fbonetti··on A multitouch musical synth built in Typescript/React
Does it not work for you? It's working perfectly on my iPhone 5 in mobile safari.
fbonetti··on OS X app in plain C
C is a sane language?
fbonetti··on Stopping All Stations – The Pyongyang Metro
I grew up in a suburb of Chicago and I said the pledge every morning, from from kindergarten to high school. I honestly thought every student in the US did the same.
fbonetti··on Write CSS inside your JavaScript
This is basically jQuery for CSS. You need to manually update the stylesheet in response to events, instead of changing the state and having the virtual DOM do the work for you.

I'm really surprised the author went through all the trouble of making this, considering that you can handle dynamic styling via inline styles in React.

    class MyComponent {
      render() {
        return (
          <div style={{color: this.state.color}}>
            My Text
          </div>
        );
      }
    }
← PreviousPage 7 of 8Next →