Better HN
topnewbestaskshowjobs
Log inSign up

ericHosick

1,083 karma · joined Aug 24, 2009 (17y ago) · 431 submissions

https://github.com/erichosick
Submissions

comment 4y ago · link · parent

> it's difficult to reuse SQL code which is why there are no SQL libraries worth talking about

I feel that it isn't SQL that is actually difficult to re-use. It's what SQL was designed to describe that is difficult to re-use: business entities.

comment 4y ago · link · parent

Anton Petrov has a great video on this: https://www.youtube.com/watch?v=HRaQj_IMAjY.

comment 4y ago · link · parent

This Porsche has a design flaw: I can only go 22,500 kilometers before I have to replace the tires.

This VW bus has a design flaw: I can't pull more than 1G on the race track.

comment 5y ago · link · parent

> Still hoping for those automatically refreshed materialized views in PostgreSQL, ala what VoltDB has.

Not exactly what you're hoping for and you probably already follow this pattern. pg_cron can help (and is now available in AWS RDS).

```sql CREATE EXTENSION IF NOT EXISTS pg_cron;

CREATE MATERIALIZED VIEW IF NOT EXISTS activeschema.some_thing_cached AS ...;

SELECT cron.schedule('some_thing_cached', '/5 * * *', $CRON$ REFRESH MATERIALIZED VIEW some_thing_cached; $CRON$ ); ```

comment 5y ago · link · parent

In some cases, we aren't in a position to normalize the database due to legacy situations.

However, one thing that could be done is to use views (maybe scoped in their own schema) to make the database look normalized (Facade the database). This would help with writing future SQL.

It is then possible to iteratively normalize the underlying tables by pointing legacy code at the normalized views until the denormalized tables are no longer in use. Finally, "convert" the views into tables and drop the denormalized tables.

comment 5y ago · link · parent

> 1) Make sure devs can run a realistic version of the whole stack locally.

This idea is greatly under-appreciated in the industry.

comment 5y ago · link · parent

> Every additional JOIN you make creates a cartesian product of all previously joined records and the number of rows grows exponentially => you join tables A to B to C to D -> SQL engine has to create AxBxCxD number rows, each letter representing number of rows in that table)

I think a cartesian product would be:

SELECT * FROM A, B; Given sizes a, b the resulting number of rows would be a X b or O(N^2).

With a join SELECT * FROM A INNER JOIN B ON A.id = B.id then the result rows would be MAX(a,b) or O(N).

A JOIN is a predicate that filters down the dataset.

comment 5y ago · link · parent

Location: Santa Cruz County Area (US Citizen)

Remote: Yes

Willing to relocate: No

Specialties : my preferred full-stack environment. infrastructure : AWS (most services), cloud formation, IAC (orchestration), docker (containers), Github Actions CI/CD. back-end : SQL (Postgresql). m iddle-tier: GraphQL, Postgraphile, express, node/javascript, python, typescript. front-end : react, ract-native, Expo, design : mocking (Figma), adobe illustrator. m anagement: technical leadership, team building, planning. other: Mysql, ruby, sketch, Balsamiq mockup. practices : agile, BDD/TDD (mocha/chai), UI mocking, data modeling, data scaling, and governance.

Résumé: https://www.linkedin.com/in/erichosick

Linkedin: https://www.linkedin.com/in/erichosick

email: erichosick {at} gmail {dot} com

About: Sr. Full Stack Architect and Developer

I'm really interested in working with a group of people who are focused on building solutions with positive social and/or environmental impacts.

I'm a highly creative and dedicated individual with over 35 years of experience working in startups, enterprise, services business, and everything in between.

* first principal focused and very detail-oriented

* created my first commercially used software product when I was 16

* in-depth experience in database, software, and systems architecting, agile, product ownership, and team building

* enjoy enabling others to grow and become successful

* love to innovate but always deliver

* excellent listening skills and also not afraid to say “I need help”

* enjoy solving challenging problems

* work well under high energy, “we can do it” environments

comment 6y ago · link · parent

This is the only movie I've watched that has left me feeling disturbed for weeks. I couldn't even watch all the parts and I haven't been able to watch again.

It is really well done.

comment 6y ago · link · parent

I use autopilot daily. It drives me, on a twisty road, from my house to work with intervention when I get into town.

> how quickly might it react to a perceived obstacle?

I've had it head towards a curbed median in the middle of the road and within 10 feet swerve to the right to miss it (in a spot that I've driven by hundreds of times, but this time it kinda decided to head towards the curbed median). Auto pilot can react surprisingly quickly in a good way.

So far, for me, it has never swerved quickly towards anything. There are situations, like on blind curves in the mountains, where it doesn't know what to do. At this time, it will start beeping, showing red on the screen and try its best to keep driving: even if that means quickly heading off the road. But, it doesn't act aggressive in any way. This is what I've experienced so far.

I've had auto pilot take me, hands free, between freeway interchanges, merging, changing lanes, etc. and I'm totally amazed. At other times, it does seem to do dumb things and I wonder what it had seen to consider taking the action it took.

Even with all that, there is still a huge advantage to auto pilot. Driving with it on seems to remove >a lot< of micro adjustments that I would normally be taking. I do drive with my hand on the wheel (enough pressure so I don't get the warning messages). On long drives, I really am a lot less tired: even keeping my hand on the wheel all the time.

I also have more time to scan the road for anything going on. Looking down to see my speed, for example, (basically any action that takes my focus off the road for a second or two) is less stressful.

It is utterly amazing technology and I still can't believe it is happening while I'm alive.

comment 7y ago · link · parent

We're trying out a few things right now.

1) Use a migration tool (flyway, dbmigate, etc.)

2) We try and keep scripts idempotent to minimize on migration script explosion. Also helps to keep changes to similar assets located within the same file: easier to see the progress of a given asset as it changes throughout the lifetime of your app.

3) We have a dedicated repository for each database/schema. A CI/CD process triggers on a push to a given branch (dev, qa, stage, prod, etc.). The CI/CD process runs the migration script (in this case AWS Code Pipeline). Having the schema in its own repository decouples our databases from the service(s) that use them.

4) We try our best to separate schema changes from feature changes: a) push database changes first maintaining backwards compatibility, b) then push feature changes, c) then remove backwards compatibility. So, try to minimize on rollback script.

Local development is same as yours: docker-compose.

comment 8y ago · link · parent

We used an approach called student centered learning at the University I lectured at. Basically, students sit in groups and work with each other and the lecturer acts as an enabler (this is actually harder than just lecturing for 1+ hours).

But considering we retain 90% of what we teach, I decided to have a team of students give a lecture. For QA, the team would come into my office and give me their lecture along with student centered learning tasks they created.

They then lectured in the class. Other students were a lot more attentive and ask a lot more questions. The students who lectured really knew the material.

In some cases, students would come to my office and ask if they could give another lecture.

Later, I found out, a few students liked lecturing so much that they became teachers.

comment 8y ago · link · parent

I think a lot of people miss that R&D is expensive and it is often takes those who can 'throw away money' to help fund it. This is on top of any subsidies that may exist for that R&D.

Look at cars, cell phones, computers and airplanes ("[1930's] Most people still rode trains or buses for intercity travel because flying was so expensive. A coast-to-coast round trip cost around $260, about half of the price of a new automobile. Only business executives and the wealthy could afford to fly.)"

I would love to travel to Space one time and I hope some day I can take a flight into space. Right now, space flight will literally be a "luxury vehicle that only serve as a novelty for the rich." There is no way I'll ever be able to afford it unless it is first affordable by the rich.

comment 8y ago · link · parent

> Societies are societies because they put the good of the group above the good of the individual.

Doesn't necessarily make a society good (aka righteous).

comment 9y ago · link · parent

Yes. I did get an email. You should be able to login to your Tesla account and 'choose' the Model 3 you want. Based on your choice, they give an estimate on when you'll be able to order the Tesla.

comment 9y ago · link · parent

I grew up on his sci-fi books. The Mote in God's Eye, to me, is the best science fiction I've ever read.

Lucifer's Hammer was way up there and hit close to home (being in California and all).

comment 9y ago · link · parent

The world in general for that matter.

comment 9y ago · link · parent

Fully agree. It wouldn't surprise me if acting 'scummy' was considered, by at least one party, to be non-consensual.

comment 9y ago · link · parent

> If achieving a free market requires a complete upheaval of all of our governments and laws, then the idea isn't very useful.

The idea is extremely useful: act consensual to others. There is no better basis of a social system than this. Having conversations like the one were having now is really all we need. To force the ideas on others in anyway, especially through democracy, would be hypocritical.

A social system based on utility, which is basically all social systems we've had throughout history, is violent, aggressive and dangerous. No wonder history repeats itself.

comment 9y ago · link · parent

This is a deep discussion to have: too deep for a medium like HN. That being said...

Your points pre-suppose parties consented to a dispute resolution system: one that is based on arbitrary boundaries and quite monopolistic (1).

> I can see why people don't think that the barebones style of "free market" is very free.

So, I agree that it is hard for people to understand what consent is when they were never given a chance to choose which dispute resolution system(s) they can participate in.

(1) Example being I was born in the USA so somehow automatically consented to the rules of the land.

comment 9y ago · link · parent

> "Free market" implies "I can do what I want"

I always though free implied free from non-consensual acts. It's not much of a free market if your actions are non-consensual (1).

(1) Defining what makes an action consensual is difficult but doable.

comment 9y ago · link · parent

> All because we're programming against a frozen database spec.

Relational databases, unlike XML, JSON, Key/Value stores and ORMs, do not pre-suppose document structure. On top of that, it is very easy to create new relations (entities) using Views. On top of that, you get a real algebra to play with: relational algebra.

SQL makes it crazy easy, in real time, to see your data in any hierarchal manner you like (via denormalized entities).

The one thing SQL 'lacks', and JSON shines at, is a way to return data in a hierarchical format (aka: to return JSON directly). I have 'lacks' in quotes because there are SQL solutions that can consume/spit out JSON.

An interesting idea then is to provide a way to easily convert between SQL and JSON. To that end, there is an open source project https://github.com/erichosick/sql-json that attempts this. The results are promising but there is a lot of room to grow.

comment 9y ago · link · parent

SV seems to have migrated a bit North.

At one time, Scotts Valley (other side of Highway 17) was considered part of Silicon Valley (Borland and Seagate).

comment 9y ago · link · parent

There was a study a read (that I can't find now), I think by MIT, that showed there was no correlation between what bills passed in the house/senate and the 'will of the voter' (what people wanted).

Until you took into account money. Then there was a correlation between what was passed and the 'will of the lobbyist'.

Really wish I could find that study again.

comment 9y ago · link · parent

> The issue has never been the backend systems at banks

I find this hard to believe considering the pains we were solving: now quite some time ago. Maybe they have changed.

Excessive burden on mortgage consumers is driven by many aspects.

At it's core is (was if what you say is true) the inability for backend systems to effectively aggregate and verify the necessary context to easily meet regulatory needs.

We were starting to aggregate such data allowing us to automatically verify and then fill out all forms necessary for the mortgage consumer.

comment 9y ago · link · parent

Had a company that was solving sort of this problem a while back (early 2000s). Read in forms (1003 for example), did automated underwriting (hooked in with Fannie Mae), pulled in rate sheets from different Banks to do automatic rate calculations for loan officers. Rate sheets were loaded in daily. There was a rules engine to cover the many complex rules required to determine if a loan was viable for a given 1003 form, etc.

Managed warehouse lines, etc.

comment 9y ago · link · parent

Friend wrote a feedforward neural network using jq.

https://github.com/kevin-albert/jq-neural-network

comment 10y ago · link · parent

> Heroin, meth, etc. definitely are harmful and addictive, and destroy lives. Selling them would be violent...

Unless you can personally claim ownership of those people, among other things you're claiming ownership* of, there is no aggression (initiation of violence) taken upon your person or things when someone is destroying their life.

If you can personally claim ownership of those people, and society as a whole, then you are correct and the selling of the drugs would be an act of aggression towards yourself.

* The act of withholding something from others.

comment 10y ago · link · parent

> I'd rather have fiat currency than gold, because that would save me the time and hassle of selling the gold and getting something I can actually spend.

Isn't currency backed by commodities considered something other than fiat currency?

comment 10y ago · link · parent

> Never plug in - Turbine charges batteries automatically while driving.

How does that work?

12345
15