HNHacker News
TopNewBestAskShowJobs

astockwell

1,094 karma · joined July 28, 2013

Email: astockwell@gmail.com

GitHub: https://github.com/astockwell

Twitter: https://twitter.com/astockwell

Site: http://astockwell.com

submissionscomments
astockwell··on Ask HN: What is the current state of web frameworks in Golang?
After building apps in Martini and Revel, I’ve moved to using a smattering of decent (IMHO) packages good at 1 thing:

Let me render templates in a layout file with `yield` - https://github.com/unrolled/render

Let me quickly route with param support - https://github.com/julienschmidt/httprouter

Sessions, flash messages, and secure cookies - http://www.gorillatoolkit.org/pkg/sessions

POST parameter-to-structure binding (this is optional and easy enough to do by hand) - https://github.com/mholt/binding

I write my own middlewares for logging, auth, etc. Use viper for configuration, gorm for an ORM, and for anything more complicated, accept that you’re about to learn a whole lot about it because you’re gonna be writing it yourself.

astockwell··on The U.S. Air Force learned to code and saved the Pentagon millions
The allure would be job/salary security for 10-20 years (albeit at a lower salary than SV), and retirement in 20 years with full pension and medical benefits for life.
astockwell··on What to Do When a Loved One Is Severely Depressed
That is a warning for people who live in the US, and are not moderately wealthy caucasians. Sadly yes it is bitterly true.
astockwell··on What to Do When a Loved One Is Severely Depressed
UK: 116 123
astockwell··on The Growing Emptiness of the “Star Wars” Universe
This!! Kevin Anderson, Timothy Zahn... The stories were great and the fact that all the authors included and referenced each other’s events really made the universe cohesive and rich.

There was even a trilogy (!) of books already written about young Han Solo, which were equally amazing and rich..

astockwell··on iOS 11.3 update breaks iPhone 8 devices with third party-repaired screens
The irony is all of mine that have the scorched pin are Apple's...
astockwell··on iOS 11.3 update breaks iPhone 8 devices with third party-repaired screens
Apple, I get it. I get why you do it. But seriously, this retroactive punishing of prior 3rd-party purchases is asinine. I had purchased multiple lightning cables from Anker (a very reputable brand), and had one of the iOS 11.x updates basically render them useless. Apple's product support is not fast enough, nor pervasive enough (to say nothing of cheap enough), to justify this behavior.

Edited for clarity

astockwell··on Toyorm – ORM for Go
Yes yes and yes. Unless the usecase is truly as simple as CRUD with a single model (in which case I reach for gorm), The easiest road often seems to be just using sqlx and hand-writing the inserts/updates.
astockwell··on Ask HN: Weirdest hack that you ever saw in production?
No kidding. Everything got clear queueing and back-pressure for free!
astockwell··on Ask HN: Weirdest hack that you ever saw in production?
Right after WinXP came out, I was a sys/win admin at a manufacturing co. Their ERP system was an old VB app that sat on a share drive and everyone opened the same .exe from their respective workstations.

The app required a ton of scheduled database and ERP tasks (it used a legacy flat-file db), so the vendor wrapped them all up in a secondary executable that was effectively a non-headless (headful?) daemon (this was expensive, niche industry software btw). The first instance of the application that opened would also trigger the daemon to open too, on whichever PC it was executed on (it was supposed to be opened on the server 1st). It was provided by the vendor this way, as part of the COTS application.

As a result of this daemon hack, every couple days (after the application crashed on the server, as it did frequently) I would run around the building to dozens and dozens of workstations until I found the user’s workstation that had been the first to run the ERP after the server process crashed, and thus had the daemon running on their workstation. Then I would kill it, and sprint back to the server closet to reopen the daemon before any other users would run the ERP and grab the daemon (later would just RDP after we got off NT).

It was awesome.

astockwell··on Ask HN: What stack would you use to build a CRUD web app in 2018?
There’s a couple ways to do it, depending on how much you do/don’t want it to look like WordPress. In both scenarios you have to mentally translate what you want to do into WP architecture (e.g. you want a new model? In WP that’s a custom post type, etc.).

The “easier” way is to create custom post types for each model you want, and use Advanced Custom Fields (plugin) for the data fields. Users log into the WP backend and can CRUD the custom post types. With ACF, pretty amazing things are possible (inter-model relationships, uploads, etc, and all done with amazing UIs for each type of field).

The “harder” way (if you are trying to make your app appear less like WP) is to get a plug-in that hijacks the user login process and admin, then customize the front-end to display the CRUD fields/controls (again using custom post types and ACF) when users are logged in, so your users never see the WP admin.

Both ways (and more, now that WP also has a new-ish full-featured rest API) are possible, however the standard WP caveats apply: the more plugin-spaghettini you introduce, the more unexpected issues you will face. I’ve been meaning to write up a guide, need to do that one of these days...

astockwell··on Manafort Left an Incriminating Paper Trail Converting PDFs to Word
Put that in AWS Lambda and charge $1 each. Boom, Saas-retirement-fund.
astockwell··on Guide to Writing Dockerfiles for Go Web-Apps
Indeed, although I have thoroughly enjoyed xgo[1] (docker-based x-compilation) for building cross-platform binaries with packages like Sqlite folded in.

[1] https://github.com/karalabe/xgo

astockwell··on How I went from programming to consulting (2012)
Exactly. And not just one, each partner had a battalion of them.
astockwell··on How I went from programming to consulting (2012)
By far, the majority of consulting engagements I’ve seen or participated in (Big 4 and freelance) are things that could easily be done if the company hired a few folks, for much less pay than this. Simple number crunching, tedious paperwork review, trivial integrations/dev work.. I would hazard a guess that at least 50% of all enterprise consulting spend goes to these tasks.

However the indisputable fact is that these companies are willing to shell out for this stuff, whether because they think it’s temporary work (cheaper to hire Patrick than an FTE who you then have to keep paying or dispose of) or they’re paying for the top-of-Hill expertise (eg. paying a Big 4 where you get 10 hours of a partner’s time/expertise at 1k/hour and then 300 hours of 23yo grunt labor).

astockwell··on “I thought I could ship at least 700 units to stay in business”
This is the conventional "textbook" wisdom. It is obviously desirable, but in real life completely impossible. And the gap between reality and this kind of "on-high" prescription is why so many people/families have no savings and have no real way to get out of their current situation.
astockwell··on Show HN: Encrypted VPN in 2k lines of Go
Does this work on Windows? I see the TODO item "Get working on OSX", but if this project could bring x-compatibility on the big 3 platforms (thanks Go!), that could really set it apart.
astockwell··on Oracle Tells White House: Stop Hiring Silicon Valley People and Ditch Open Source
Their offerings are certainly impressive when you (or your leadership) are willing to look. Most of their flagship offerings are also HIPAA certified (or can be upgraded to such).
astockwell··on Oracle Tells White House: Stop Hiring Silicon Valley People and Ditch Open Source
Not to worry, the aging executives in big corps/government are already well entrenched in the belief that "all of AWS is insecure ... because remember company xyz got breached on AWS..." referring of course to someone putting user data in public, unsecured S3 buckets. Will be a while yet before they start eating the lunch that cloud providers are peddling.
astockwell··on To treat back pain, look to the brain not the spine
+1 to Starting Strength
astockwell··on The New Preschool Is Crushing Kids (2016)
Your concern is completely valid, ignore the haters. We struggle with the same thing. We try to give our daughter the final say in any and all "structured extra-curriculars" she's involved in, even quitting right after starting, on the hope that her feeling even a little in-control of her own schedule is more valuable than "learning to finish anything you start". But cutting down on those is the only other place I can see to allow more unstructured play. And even then, we try where we can to "assist" with making the unstructured time more valuable, by trying to be present, engaged, and willing to do pain-in-the-ass things (like go run in the hot park for an hour after a long day of work) if that's what she wants. We try to ask her, and suggest options "do you want to stay in and play or go to the park or xyz...". But who knows, there is a constant feeling that no matter what, we're doing it wrong.
astockwell··on The New Preschool Is Crushing Kids (2016)
Really appreciate the perspective. This is just one more on the huge pile of things where the US would be well served to just look around at how other countries are doing it better.
astockwell··on Equifax Faces Multibillion-Dollar Lawsuit Over Hack
Indeed, this seems only logical. I honestly have this thought every time I make a large financial decision: Renting a house? Would be much easier to break the lease (Should I ever need to) if my surrogate 'corporation' with few assets were the leasee. Ditto with many medical situations/other large expenses. Plus, much better tax deductions!
astockwell··on Ask HN: What's your spectacular burnout story?
You don't have to bear the burden alone. There are people available to listen and talk with you a 24x7 at 1-800-273-8255 (U.S.). Please consider talking to someone.
astockwell··on The Company Behind Many Surprise Emergency Room Bills
> luckily my wife doesn't work so I didn't have to take time off for all the phone calls and following up that was required

This.

This is so horrifically true, it takes call after call after call (and emails, and faxes, and snail-mail claims forms that take "30 days" to "process") to get anything changed, and by then you have collections companies harassing you and your credit goes down the drain. Meanwhile you must keep working and taking care of family and dealing with the actual illness/issue that led to the medical visit in the first place. It is insane.

astockwell··on The Company Behind Many Surprise Emergency Room Bills
Unfortunately, the grand-parent poster's experience is par for the course at most Fortune 100 companies.
astockwell··on The Company Behind Many Surprise Emergency Room Bills
You may have some recourse with the insurance company because for emergency care that leads to an admission, the hospital being in-network is supposed to be what counts. Individual doctors being out-of-network should only come into play if you have a procedure done at their practice's office. I sincerely hope it works out for you. It might not hurt to get a 1-hr consult with a lawyer and send the insurance company a nasty letter?
astockwell··on The Company Behind Many Surprise Emergency Room Bills
It is exactly as crazy as it sounds, unfortunately. But due to many years (decades!) of pre-meditated political maneuvering, one of our political parties has managed to inextricably relate any kind of desire for "single-payer" or "socialized" medical system with effectively being a communist USSR apologist. No exaggeration.
astockwell··on Cuomo Declares a State of Emergency for the Subway
Like the programmer anecdote that's made the HN rounds recently: Being a crummy programmer who regularly saves the day (because the system is crummy and constantly needs saving) will get you more esteem/money/visibility than being a good programmer who's systems hum along with no fuss.
astockwell··on Go Language – Web Application Secure Coding Practices
Honest and earnest question for you (as bluemonday's author): Where should gophers draw the line between Go's standard html/template library for rendering "safe" HTML, vs. needing to use bluemonday? The question assumes that any and all user inputs are checked/validated at the point of receipt. Is bluemonday just the "on steriods" version (e.g. provides more granular control, whitelist of specific tags, etc)?

Perhaps it is more of a use-case question - I haven't worked on comment or wiki systems but that seems like it would be much harder to validate user inputs, and thus maybe that is where the line should be drawn? When user inputs are expressly expected to have markup?

← PreviousPage 6 of 8Next →