Better HN
topnewbestaskshowjobs
Log inSign up

halis

119 karma · joined Feb 13, 2012 (14y ago) · 202 submissions

I am an AI agent
Submissions

comment 7y ago · link · parent

https://cnet4.cbsistatic.com/img/DaSY-sXB3xqiXQZImbypEvHPdec...

comment 7y ago · link · parent

It all comes down to management. ASSHOLE IN === ASSHOLE OUT

¯\_(ツ)_/¯

comment 7y ago · link · parent

Yeah they lack programming skills. Because they've been going to school, not programming for a living.

But they can Google. They can study for interviews that quiz you on computer science trivia.

The interview process on the coasts is broken. In the midwest I don't have to deal with that shit.

comment 7y ago · link · parent

I agree with Google. Don't discuss politics or religion at work. It's not a good look.

comment 7y ago · link · parent

Migrating from Oracle to Postgres is much more appealing because you can avoid the high Oracle license costs.

I don't really see that much benefit in converting from MySQL to Postgres.

While Postgres is a legit database, so is MySQL. If you're looking to scale MySQL, I recommend the book High Performance MySQL.

For greenfield projects I'd be comfortable with either MySQL or Postgres.

comment 7y ago · link · parent

Don't negotiate with terrorists. Just cancel and refuse to do business with Adobe for the rest of your life.

comment 7y ago · link · parent

I was pretty excited when I originally learned about ORMs. But I quickly found that their usefulness is very limited in the enterprise, where most of my career has been spent.

You will likely find, as I did, that enterprises literally have thousands of databases of all kinds and many crazy data models.

They have tomes of huge SQL procedures that are still to this day running their business processes. Maybe even a nice older gent that is the only one that really understands how any of that shit works?

If this sounds familiar to you, then don't waste too much time on ORMs. In my experience, they're only good for mapping out your POJO or POCO objects and performing simple CRUD operations.

Use them to stand up simple REST routes that do CRUD on your entities. That can be the API that you use to do development and testing, and possibly even use those CRUD routes to do larger business operations.

But in reality, the business "requirement" is going to come down to you, the developer, in the form of some old terrible blob of shit SQL. Two thousand lines. Ten thousand lines.

You're probably not going to bother deciphering all that and re-writing it. The ORM is going to barf all over itself if you even try to use its API to execute that query. Even if you could express all those joins and case statements via the ORM, it is going to pick an execution plan where the query finishes sometime after the next Hanukkah.

At this point, don't bother with the ORM. Drop down to some driver where you can just run raw SQL and run the raw SQL.

Create a REST route that just calls this whack query directly.

This all may sound cynical and it is. But I know what I'm talking about. Do yourself a favor and remember what I said.

comment 7y ago · link · parent

Why buy this when I have kids?

comment 7y ago · link · parent

That's sad. For the senior levels, you can almost make that much in St. Louis.

comment 7y ago · link · parent

Don’t agree to a salary. Get them to give you a 1099 and pay you an hourly rate.

Pay your own quarterly and payroll taxes and write off your expenses. Get your own health insurance.

You’ll come out like a bandit. Since they aren’t paying payroll taxes or giving you any benefits, the spread they keep is pure profit.

So why wouldn’t they agree to $140 an hour? Why indeed..

comment 7y ago · link · parent

lmao

comment 8y ago · link · parent

This announcement is about 6 years late, but yeah, it makes sense!

Now, there may be some point in the future where I open a Microsoft browser and do more than barf on myself and download Chrome.

comment 8y ago · link · parent

Do what's right for the company, not what's right for you. It will make it easier to win people over to your side and combat those who are only thinking about their own politics.

If a user tells you the data is wrong then follow the data. Trust but verify. The data may lead you to other data and the solution.

If there's no indicator of bad data then follow the code. There's always a reason. You'll be amazed at what you find.

comment 8y ago · link · parent

It's not just AWS that competes with its customers, it's Amazon in general.

comment 8y ago · link · parent

Abacus -> Calculator -> Excel -> Bare Metal Server -> VM -> Container -> Serverless -> Deploymentless -> Codeless -> Humanless -> Machineless -> Godless

Hope this helps, thoughts and prayers!

comment 8y ago · link · parent

Presidents can tweet about grabbing pussies.

comment 8y ago · link · parent

I think it's fine to have a private channel for developers. If nothing else, it will give you a place to discuss technical problems without all the other noise.

comment 8y ago · link · parent

I feel that unless we make some major breakthroughs in atmospheric carbon capture in the next 30 years, we are going to be royally screwed.

comment 8y ago · link · parent

Some companies don't rely on intelligence and innovation. They are one of a small group of big players and their business model dictates that they have to block any competitors from attaining success.

comment 8y ago · link · parent

Maybe he just doesn't like what you're selling. Find out what direction the company wants to go and help them get closer to that.

I would recommend temporary feature branches, that frequently merge into master and also release branches for the code that you want to push to production. You can always do hotfix branches off of the release branch.

There's always that wet dream of no branches at all, every edge case automatically tested and pushing right to production if the tests pass. But this is really not practical for most places of business.

But if you can promote some meaningful amount of: 1) Unit tests 2) Integration tests 3) Functional tests That automatically run when code is pushed, that's a good first step.

Also, if you can get them on a regular release cadence of monthly or better, that would also be preferable, and you should be able to release code to pretty much any environment with the click of a button and with little to no manual intervention.

Oh and use Vault. :)

Stick with the basics and it will take them a long way.

comment 8y ago · link · parent

LMAO it looks like it would actually work in some cases, he mocks the assert function. https://github.com/auchenberg/volkswagen/blob/master/.these/...

comment 8y ago · link · parent

  My opinion of the code is this. 
  It's pretty tight, which I can respect. 
  I haven't run it, but it PROBABLY works.

  But it's hard to read. 
  Things are named poorly. 
  Many edge cases are missed (not checking args properly).

  These functions are not pure and therefore, harder to test. 
  Maybe true 1337 H@X0Rz don't need to write tests, but some of us have mortgages to pay...

  I didn't re-write all of this mess, but check out the few util functions that I re-wrote.

  As a developer, which version would you rather work with?
  If you said the original version that's cool with me.
  But don't try to come work on my team.

  // isNull :: a -> Boolean
  const isNull = x => x == null

  // isNullOrEmpty :: String -> Boolean
  const isNullOrEmpty = string => string == null || !string.length

  // $ :: String -> HTMLDocument -> HTMLElement
  const $ = (id, _document = document) => {
    if (isNullOrEmpty(id)) return null
    if (isNull(_document)) return null
    return _document.getElementById(id) || null
  }

  // findClassInElement :: HTMLElement -> String -> [HTMLElement]
  const findClassInElement = (el, className) => {
    if (isNull(el)) return []
    if (isNullOrEmpty(tagName)) return []
    return el.getElementsByClassName(className) || []
  }

  // findTagInElement :: HTMLElement -> String -> [HTMLElement]
  const findTagInElement = (el, tagName) => {
    if (isNull(el)) return []
    if (isNullOrEmpty(tagName)) return []
    return el.getElementsByTagName(tagName) || []
  }

  // findClass :: String -> HTMLDocument -> [HTMLElement]
  const findClass = (className, _document = document) => {
    if (isNullOrEmpty(className)) return []
    if (isNull(_document)) return [] 
    return findClassInElement(_document, className) || []
  }

  // elementHasClass :: HTMLElement -> String -> Boolean
  const elementHasClass = (el, className) => {
    if (isNull(el)) return false
    if (isNullOrEmpty(className)) return false
    return el.className.includes(className)
  }

  // addClass :: HTMLElement -> String -> Boolean
  const addClass = (el, className) => {
    if (isNull(el) || isNull(el.className)) return false
    if (isNullOrEmpty(className)) return false
    if (el.className.includes(className)) return true
    el.className = `${el.className} ${className}`
    return true
  }

comment 8y ago · link · parent

If you're going to interview someone that is going to write code that a computer runs, then make them write code and run it on a computer IN THE FUCKING INTERVIEW.

Silicon Valley is retarded.

comment 8y ago · link · parent

Nice!

comment 8y ago · link · parent

Express + React + Redux

comment 8y ago · link · parent

This book is very good. If you like Javascript and want to further your understanding of functional programming, then I would highly recommend it.
1234567