HNHacker News
TopNewBestAskShowJobs

phereford

433 karma · joined March 27, 2007

I was born and raised in Laredo, TX. I graduated from MIT in 2005 with a degree in Civil Engineering. I graduated from Boston College in 2008 with an MBA in marketing.
submissionscomments
phereford··on Let Postgres Do the Work (2013)
Yea. It returns a table of rows, where the return columns are defined in the stored procedure. I may have used the wrong nomenclature. I was trying to differentiate between a table in a database schema versus one defined in a function.
phereford··on Let Postgres Do the Work (2013)
Honestly, it's yak shaving at that point. Like the article pointed out, you can create an index on a stored procedure that is IMMUTABLE. That will have some effect on the performance of the query.

There are other patterns you can use to track via version control the changes for your stored procedure.

phereford··on Let Postgres Do the Work (2013)
Absolutely agreed. In our particular situation, the ruby calculations were the bottlenecks based on our benchmarks.
phereford··on Let Postgres Do the Work (2013)
Most ORMs will not do the level of aggregations you want or need without writing raw SQL within your ORM. If you are already writing raw SQL in your ORM for aggregation level computations, you might as well create a stored procedure, make it IMMUTABLE (if you can) and gain those performance benefits.

At the end of the day, I would just use the tool that has the most comfortability with the team on the project. You can obviously start with an ORM, but there may come a point in time where performance needs a little boost.

phereford··on Let Postgres Do the Work (2013)
Absolutely! We use rails. I just mentioned doing it in that method as opposed to throwing it in a migration. That migration shouldn't change in version control. We wanted a history of the changes and an easy way to access it in migrations.

Sorry for not explaining that fully.

phereford··on Let Postgres Do the Work (2013)
With the correct abstractions, you can definitely run tests on save.

SQL is rather readable these days. It's obviously not as easy to read as ruby or python and is slightly more verbose, but it is certainly readable.

Mileage will vary of course. There are cost/benefit trade offs with every architectural decision made.

phereford··on Let Postgres Do the Work (2013)
That's exactly what we did. We return an anonymous table of records in Postgres that are then passed to ruby to render an excel file. The SQL query takes 27s on average. The ruby view generation is fast as well but I haven't profiled that part of the report.
phereford··on Let Postgres Do the Work (2013)
At work, we have an internally generated report that was done purely in ruby. It worked, barely, munging numbers for about 1000 records. When we hit 4000 records, the report took about 6 hours to run in ruby.

We looked for some obvious optimizations like eager loading and some map reduce magic and implemented them. That brought us to a range of 45 minutes to 2 hours.

We decided that it was still not good enough. We moved ALL of the report into SQL functions (Postgres) and we have the whole function running in 27 seconds.

I agree with some of the top comments that maintaining this is a little trickier than ruby code, but some ideas we came up with in maintenance: 1) Write the SQL in a ruby file that has a class method of sorts that returns the generated function. This allows for version control to track the changes of the sql function. 2) Focus on tests at the interface level. We had great test coverage on the end result prior to moving to SQL. We were able to re utilize those tests to verify accuracy with calculations that are now in SQL.

This really isn't for everyone, but for those that want to try something new, it is worth it.

phereford··on Freelance Isn't Free Act Passes in NYC
While Wikileaks may not alter any of the information they are given, it is plausible that their sources have the ability to alter documents before sending to Wikileaks.

The only newsworthy item I have seen was this: http://mobile.reuters.com/article/idUSKBN12Y2WY

Of course nothing has come of this speculation, so it may end up being nothing.

My last $.02, given the sensitive nature of some of the information that Wikileaks releases, there is probably no avenue for corroborating the materials other than, maybe, how the source received said materials.

phereford··on Conversations Managers Should Have to Develop Their People
I have had a number of managers in my career. Some where they couldn't careless about my career prospects (no 1-1s, no conversations, nothing). And the best ones put me in positions to thrive and grow.

For those of you in either of these scenarios, recognize it and learn from it. Believe it or not, so much can be learned from good managers, but even more can be learned from bad managers.

phereford··on Having a ‘work spouse’ makes you happier?
Who do you feel less loyal to? I only ask as I essentially try to keep the same boundaries but don't feel less loyal. I actually feel more loyal as I have more _focused_ time for the company, but this is probably just a rationalization on my part.

Edit: My question is more along the lines of: Do you feel less loyal to the company or to the people within the company?

phereford··on Choosing Ember over React in 2016
I completely echo this sentiment. I like Ember, but have found that the learning curve of a React/Redux app is significantly smaller than that of a similar Ember app.

Small sample size for me (2 Ember projects, 6+ React projects), but the entry level engineers to the senior level engineers seem to grasp React/Redux MUCH faster than Ember.

phereford··on Code I’m Still Ashamed Of
It's a numbers game once they subscribe, even if the link is there. Some people, myself included, won't hit that unsubscribe button. I'll just forever mark it as spam until it no longer shows up in my inbox.
phereford··on Review: The NES Classic Edition and all 30 games on it
Amazon (in the US) sold out of all of it's Preorders within hours of the preorder launch a few months back.
phereford··on Internet Attack Spreads, Disrupting Major Websites
I _think_ WL == WikiLeaks.
phereford··on 5900 online stores found skimming
Yep. I completely agree. I hadn't had my early am coffee yet ;)
phereford··on 5900 online stores found skimming
You are absolutely right.
phereford··on 5900 online stores found skimming
I've worked with similar organizations that want the transaction on their site due to all the reasons mentioned in the comments.

There are providers that use JavaScript to allow you to take payment information on your platform but never let the sensitive details hit your server. I believe this removes your platform as an attack vector for leaking credentials. The only locations that have traces of that information are the browser and the payment provider.

phereford··on “We're considering banning domains that require users to disable ad blockers”
This industry is ripe for innovation. I agree that the state of malware being served through Ad Exchanges is grotesque and I fully employ my ad blocker everywhere.

Here is the thing I just dont get. Why doesnt some tech savvy organization create a white label solution that companies can either slap a subdomain on and invite "Customers" to fill ad supply. Self host the curated assets through said white label solution. Moderate with sophisticated computers that are not subject to the vast majority of mal ware (excluding 0-day obviously), and move on. Im sure someone could easily serve the ads off of the main domain anyway to circumvent all of the ad blockers on subdomains.

This is a perspective from the outside looking in, but people seem to just complain about the problem instead of looking for solutions.

EDIT: BAH, so there is a conversation from last year. https://news.ycombinator.com/item?id=10221859

phereford··on The Twitter Contradiction
ESPN published an article the day after with about 10-12 tweets surrounding the victory. You didn't need to be on Twitter to see it, just on ESPN the day after to realize what you missed.
phereford··on Why We Moved to React
Awesome! I had chosen flux for one project I was on and really enjoyed it!

Thanks for the post!

phereford··on Why We Moved to React
https://github.com/coryhouse/react-slingshot is my go to boilerplate.
phereford··on Why We Moved to React
There are lots of popular Flux libraries.

https://github.com/acdlite/flummox

https://facebook.github.io/flux/

https://github.com/reflux/refluxjs

http://fluxxor.com/

https://github.com/reactjs/redux

Each of these appear popular in their own right. Given they mentioned Flux, it probably is the actual Flux library.

phereford··on Transitioning to Flux Architecture
From my initial readings and implementations of flux, it seems that actions should only really interact with stores through the dispatcher. To achieve uni directional data flow here, you could pass the DataSTore.loadingState from the component to the action.

Maybe I should ask before stating: What was the intention of coupling your store and action in this scenario?

phereford··on The Value of Postmortems
I do not disagree about the shell history being very important. Some histories do end up getting truncated at a set interval. That was the main reason I brought up tracking this command trail at some point close to the task being completed.
phereford··on Ask HN: At what company size do downtime postmortems wane?
Agreed. The company I work for pays on the order of $4k/mth for this particular provider and it's inexcusable when this downtime happens and we hear nothing other than "Our DC Node went down". Why did it go down? What are you doing to prevent this from happening again?

Le sigh.

phereford··on GameCentral talks to the creator of Oddworld, gains insight into games industry
As an MBA type, I take extreme offense to your statement. As a full-time programmer, I totally agree with you!
phereford··on Rails 4.1.0 released
You are correct that attr_accessible is gone in favor of strong parameters.

Google fu yields http://stackoverflow.com/questions/17371334/how-is-attr-acce...

Depending on how your test suite is set up (if you have one) there may need to be some sweeping changes there. When we migrated we had to switch from our should syntax to the expect s syntax.

I can't remember anything else that was super crazy.

phereford··on SXSW RIP
I haven't been to SXSW in 2 years. Three years ago the technology portion of SXSW definitely felt exactly as you described this year's music. Massively unorganized. Massively chaotic. Couldn't really find anything you were looking for, even if you tried.

While speakers and talks were mostly on time, the rest of it was just pure chaos.

phereford··on SXSW RIP
Hehehe. Someone doesn't like the `Homebrew` setting on Terminal ;).
← PreviousPage 2 of 4Next →