HNHacker News
TopNewBestAskShowJobs

pixie_

1,447 karma · joined October 21, 2011

submissionscomments
pixie_··on Announcing TypeScript 2.0
On the other hand I don't understand how anyone can work with a code base that is dynamically typed. I'm looking at a function parameter in a random file. How do I even begin to work with it?

Unless you wrote the code yourself you pretty much have to run the program first and then REPL to see what the type actually is and the properties it exposes Slow, arduous, unnecessary.

Also especially in the early stages of any development project I am refactoring like crazy as things come together. Static typing enables refactoring operations that are lightning fast with almost zero chance of error. Refactoring in any dynamic language is super error prone and leaves open the possibility for bugs that often show up unexpectedly at runtime.

Do people who prefer dynamic languages actually use the benefits of dynamic typing in the first place? Changing variables from one type to another mid-stream. Dynamically adding properties to objects, using == instead of === etc.. Those things are a recipe for bugs, inconsistency, and unmaintainability right from the get go.

Static typing doesn't feel intrusive, it feels like a flashlight. I don't like coding in the dark, feeling around for what everything is or is not.

pixie_··on Ask HN: Is web programming a series of hacks on hacks?
What's sad is the zillions of hours wasted by engineers on an inherently flawed stack. What's sad is how ridiculously complicated it is to create and manage relatively simple UIs. What's sad is an entire generations of programmers growing up and thinking this is normal.

Programming is supposed to be about creating platforms for each other so we can continue solving higher (and higher) level problems. This web crap has us stuck fighting in the mud going nowhere.

pixie_··on Ask HN: Is web programming a series of hacks on hacks?
Yes. I feel like we're in the dark ages right now.

JavaScript - Dynamically typed, does not scale what so ever. Code written in it becomes 'read only' very quickly. Impossible to refactor.

CSS - Also becomes impossible to manage. Who knows if the class you wrote is or isn't being used in HTML or JavaScript somewhere. Same problem, read-only, it only gets bigger and more unmanageable.

HTML - At the heart of it, the foundation is the layout engine and positioning, and it sucks. Flexbox was supposed to bring sanity, but I feel like we're still waiting on it.

Put these three stooges together and you get where we are today. Rewriting the same damn app every year in another framework in what can only be described as some sort of high paying purgatory.

pixie_··on Why bad scientific code beats code following “best practices” (2014)
I've seen tons of over-engineered code in the real world. People with the title of 'architect' abstracting every last bit of code so that it's impossible to make sense of. Everyone starts off wanting to make a 'powerful framework' that can do everything, but end up with an over complicated mess of configuration that makes it too difficult to do anything with it.

I've seen this happen multiple times at multiple companies.

pixie_··on What’s New in C# 7.0
The most productive I've been as a developer was 20 years ago when I was creating VB6 apps and components...
pixie_··on NIST declares the age of SMS-based 2-factor authentication over
It's annoying in a lot of services I can't use my google voice number to authenticate.
pixie_··on Why Angular 2 Switched to TypeScript
I've been programming for a long time and TypeScript has been a slam dunk for me. It makes programming large web apps actually considerably more manageable.

Unfortunately I spend a lot of time defending the merits of static typing to my co-workers. At the same time they're going on about how unit tests are important, while static typing eliminates entire classes of errors and they don't get it for some reason. Unit tests while important don't prevent type errors, and if you tried using them for that you'd have orders of magnitude more tests to write.

I feel like I'm taking crazy pills having to defend static typing while every dynamic language I've used for any project of any considerable size has been a complete nightmare to manage. At this point I feel like a lot of new coders coming out of school just haven't written anything large enough yet and maybe that's why they don't see the point.

pixie_··on Why Angular 2 Switched to TypeScript
Development cost? I've had huge development savings using typescript. The support for fast refactoring plus constant intellisense of any type errors has sped up my up my development significantly.
pixie_··on Why Angular 2 Switched to TypeScript
Typing doesn't get in the way of prototyping code. On the contrary it's essential. When you're starting out a new project the tendancy to refactor is very high. Everything is changing and in flux as you go from nothing to something. Having static typing makes refactoring quick, easy, and most of all safe. Developing new projects for myself in TypeScript vs JavaScript is exponentially faster.
pixie_··on What If There Just Aren’t Enough Jobs to Go Around?
I feel like ancient civilizations a lot of times turned to art once their societies leveled off. Large structures, pots, roads, figures, clothing, etc.. I believe art is unlimited resource and we could have an economy running purely on art. Isn't a large portion of the economy already running off of art? Movies, games, tv, media, events. I actually feel there even a lack of art right now in terms of food, furniture, products in general. I'd pay for objects with more thought put into them, but there isn't enough people today to dedicate their time to art. With all these menial jobs taken up, maybe even more people will turn to custom crafts and trades. Where what I'm paying for is the creativity and uniqueness of the objects I'm buying.
pixie_··on What ORMs have taught me: just learn SQL (2014)
ORMs are not for people who don't know SQL.

The secret to using an ORM is knowing exactly the SQL it will generate underneath. The advantage to using one is static typing as well as writing orders or magnitude less code than SQL. As well as orders of magnitude more understandable code than the equivalent SQL.

If you work on heavy enterprise applications the ORM can be your best friend or worst enemy. It comes down to knowing the tool you're using inside and out. It will make you much more productive in the long run. And sometimes yea, you need straight SQL or a stored proc to get the job done. That's OK.

pixie_··on Google’s stock slid after report on search ad decline
Somehow in 18 years and billions of dollars of revenue, Google has not figured out another way to make real money.
pixie_··on Migrating a 10,000-line legacy JavaScript codebase to TypeScript
It is pretty much impossible to have any sort of inferred structure from plain javascript. The reason you can use super powerful tools to refactor, rename, and find all references across files in typescript is because the IDE can build a 100% accurate data model of your code base when it's written in typescript.
pixie_··on Migrating a 10,000-line legacy JavaScript codebase to TypeScript
Structure means walls. There are tons of crazy things you can do 'outside' the walls with javascript. There are no checks if anything you reference exists or that your assignments are compatible. The browser's compiler will figure it all out and/or blow up at run-time.

Type and reference checking creates the walls your code must stay inside of otherwise there are compile errors. The compiler enforces a certain structure on your code that you must adhere to in order for the compilation to succeed.

Think of it like a coloring book where TypeScript keeps you inside the lines. Ever see a three year old's coloring book? :p

pixie_··on Google Launches Fresh-Grocery Deliveries
I agree. I'm pretty jaded on Google's side projects.
pixie_··on Overcoming Intuition in Programming
I talk with a lot of programmers that think that abstracting everything is super important. Everything must be a black box and the programmer should have no idea what's happening inside of it. Their code is an over engineered mess of interfaces, dependency injection, and code so deep and isolated you have no idea how anything ever works (I mean like even if you had the source code it's so convoluted you could never make any use of it.)
pixie_··on React/JavaScript fatigue
The last time I felt productive doing UIs was with WinForms and before that VB6.
pixie_··on What RESTful actually means
REST is the definition of a buzzword. Vague. Useless. Everyone talks about it, but no one ever 'understands' it. You make your API REST not because you think it's good, but because everyone else does it. It's instant karma. Like XML was 10 years ago. Who cares if you have to make a lot of ugly confusing endpoints - at least you can call your API RESTful.

I like how Dropbox bucked the trend and went with a simple POST based API. JSON parameters in. JSON response out. No complicated urls, strange headers, verbs, hateoas, etc..

https://www.dropbox.com/developers/documentation/http/docume...

pixie_··on Angular 2 Beta released
I'm not talking about popularity. I'm talking about indiscriminate hate because it's connected with microsoft. C# has suffered the same stigma since the beginning.
pixie_··on Angular 2 Beta released
If only typescript was written by facebook or google then people wouldn't hate it.
pixie_··on NASA Orders SpaceX Crew Mission to International Space Station
SpaceX is significantly disrupting the entire launch industry right now.
pixie_··on Dropbox API v2 launches
A simple POST based API? What is this blasphemy?
pixie_··on How Uber and its peers turned us into horrible bosses
So many times I've been in a normal taxi and wanted to rate the driver. Knowing that if they were held accountable for the truly horrible service they would never drive again. This is part of why Uber is awesome.
pixie_··on Introducing Shadow DOM API
Exactly, how many times do you want to use a component but find it near impossible because it's written with a framework, or uses CSS styles that conflict with your own, or is written for use with a different version of the very framework you're using... this is why we keep re-inventing the same dumb web components over and over again.
pixie_··on Show HN: WebRPC – a simple alternative to REST and SOAP
If you're transferring anything other than hypertext over http then you're a hypocrite.
pixie_··on Goodbye CoffeeScript, Hello TypeScript
ES6 doesn't have static typing either.
pixie_··on Facebook Relay: An Evil And/Or Incompetent Attack on REST
It does encourage more endpoints because I can't include data from two different objects in a response. They should be GET separately. With highly relational data where I need to create an endpoint that returns information regarding 50 different object types, how should I do that? My rolled up response is no longer REST.

When I need to act on that data and call an API that can do a variety of CRUD operations to 50 different objects types, how should I do that in a REST way?

It leads to developers creating a multitude of APIs to interact with those 50 different object types. Just so they can say their API is REST. For someone trying to use the API it's a nightmare.

pixie_··on Facebook Relay: An Evil And/Or Incompetent Attack on REST
I deal with REST zealots like this everyday :( just the fact that people spend so much time debating what is and what isn't REST should be a red flag that maybe it isn't the answer to everything.

All the simple REST examples make it look like it is the perfect solution for CRUD tasks. But in reality API endpoints are not a straight pass through to the database. An endpoint may do any combination of CRUD tasks, it can't be type casted as a single one with a HTTP verb.

Overloading HTTP error codes is another interesting problem. If the server returns 404 for a resource, what actually happened? Did the web server or my application return the 404. Conflating HTTP and application error codes leads to confusion.

HATEOAS is just superfluous. I've met zealots who will defend it to the death. I just haven't found a practical use for it.

Surface area and complexity are a big deal. REST encourages creating a CRUD interface for every single resource. I've met people who have created literally 100 endpoints upfront for a small application - how is that maintainable?

I like that Facebook is standing up to the zealots. I get attacked at work when I try to create simple API endpoints and they aren't 100% REST (if anyone could agree what that even is.)

pixie_··on Transatlantic divide: how U.S. pays three times more for drugs
Biotech is a goldmine.

Hint: It's not. R&D isn't guaranteed to pay off. Why even do it or invest in it if the chance of success is so low?

pixie_··on Amazon Will Ban Sale of Apple, Google Video-Streaming Devices
It's been awhile since the last big anti-trust trial. Get the popcorn!
← PreviousPage 3 of 13Next →