HNHacker News
TopNewBestAskShowJobs

nvivo

213 karma · joined December 15, 2014

submissionscomments
nvivo··on Be Careful with UUID or GUID as Primary Keys
Well, then it's not an UUID. It's just 128 random bits. If you just want to be the most random possible, you can go 256, 512, 1024, etc. That may be what you want, but you can't say UUID v4 is a "total waste" or "serves no point".

It's purpose is to never collide with another UUID v4, not to be the most unique value ever.

nvivo··on Be Careful with UUID or GUID as Primary Keys
This is true, but I wasn't able to find a real issue with this. This issue is likely to appear in benchmarks, but unless you're trying to squeeze that last bit from the database, not using any caching anywhere in your app, not using any index, not having enough free memory, etc you're likely to never notice the difference.
nvivo··on Be Careful with UUID or GUID as Primary Keys
That's not a real issue. I can understand this may bite some people that don't read the docs or don't understand encoding, but it's more misinformation than a technical problem.

UTF-8 is variable length anywhere, not just inside mysql. If you don't want this behavior, you can either use UCS-2 or UTF-32. UTF-16 and UTF-8 are variable length encodings, period.

Most databases that have use char length for unicode actually work with UCS-2, and use 2 bytes per char, like MS SQL Server.

nvivo··on Be Careful with UUID or GUID as Primary Keys
I'm not sure what you mean exactly. The textual representation of an UUID HAS all the bits intact. UUID formatting is not lossy compression.
nvivo··on Be Careful with UUID or GUID as Primary Keys
You must be confusing UTF-8 with 4-byte Unicode. UTF-8 by design will use variable length encoding, otherwise it's not UTF-8.

I can confirm both these commands return 36 in my mysql installation:

SELECT LENGTH('15c915fc-4d50-11e7-9bc7-50b7c307c620' COLLATE utf8_general_ci);

SELECT LENGTH('15c915fc-4d50-11e7-9bc7-50b7c307c620' COLLATE utf8mb4_general_ci);

nvivo··on Be Careful with UUID or GUID as Primary Keys
Exactly, but in any case even mysql version of UTF-8 should store an UUID the same way as ASCII.
nvivo··on Be Careful with UUID or GUID as Primary Keys
Well, event stores are a very specific type of database that exists solely for the purpose of knowing exactly the order of events. It's not fair to say UUIDs are a problem because one very specific case shouldn't use it.
nvivo··on Be Careful with UUID or GUID as Primary Keys
Completely agree. I have been using UUIDs for a lot of stuff for a while, and you get used to it just as you get used to any other thing. Performance is usually indistinguishable. Most of the issues in the article are related to practices, some are related to specific platforms. Every piece of code may bite you if you don't know what you're doing.

Now, if the developer don't know when it makes sense to use a UUID, there are certainly more problems in the application to worry about. Which is 99% of the cases in most business applications.

nvivo··on Be Careful with UUID or GUID as Primary Keys
You can generate v1 UUIDs. v4 are random by design. You can also create your own version of UUID, as long as you set the version bits correctly, although I wouldn't recommend it.
nvivo··on MySQL 8.0: Retiring Support for the Query Cache
Mysql for some reason still lacks:

* uuid type

* datetime with timezone

* storing (and retrieving) the view definition as it was defined with comments, formatting, etc

* using the same temporary table multiple times in the same query

This is not an extensive list, but are things that bite me every day with mysql.

Even though it's not query cache related, I wonder why such basic features are still missing and what are the plans to include them? They sound much simpler and more important to add than adding a nosql protocol to a sql database.

nvivo··on Ford to cut North America, Asia salaried workers by 10 percent
I don't pretend to have the full numbers, but I guess things are more complicated here in Brazil than in the US.

A common fuel station here usually have 8 pumps, and usually 4 employees to operate at a time. Due to laws on working hours, etc, there may be 2 or 3 shifts. Without going into peak hours and different # of people per shifts, a standard station may easily have 10-15 employees. Then multiply what you pay to each employee by 2 due to taxes, etc.

Not saying it's the highest of the expenses, but employees in Brazil adds up to the operation costs. It's one of the main complaints in business here.

nvivo··on Ford to cut North America, Asia salaried workers by 10 percent
I should have been more clear, but I think people here are reading too much from I said. It's useless to try to repair it, but I just want to explain what I intended to say.

First, I wasn't implying investors are bad people. In fact, I tried to imply the opposite.

What I meant was that a lot of people (at least people I know) blame companies for making decisions that cut jobs, and investors for pushing in these directions.

But at the same time, nobody is so selfless in their own life decisions in order to sacrifice their careers for someone they don't know. In fact, most people will consciously decide to earn more and make their lives better even if that means other people will lose their jobs. For example, I doubt any software developer will ever change careers just because the software he works on will cause half of the sales team to be fired. That's what I mean by people not being so selfless in their own life decisions.

But when it comes to losing their own jobs, it's common to hear people say that companies or investors could decide take the loss, earn less and keep these jobs, like the decision was a choice between saving lives or killing puppies for 10 cents more, and someone is just too greedy.

So, by "expecting investors to grow this moral guideline", I didn't mean they don't have a moral guideline. I meant people expect a much higher moral guideline that would make them sacrifice themselves in favor of the greater good, while other people don't actually do it themselves.

nvivo··on Ford to cut North America, Asia salaried workers by 10 percent
Here in Brazil I know from published statistcs that atendees make up about 25% of the running costs of a fuel station. Mostly due to taxes over the payroll.
nvivo··on Ford to cut North America, Asia salaried workers by 10 percent
I think it's funny how we never act so selflessly in our entire lifes, but expect investors, which are people that made their career goal to be good at making more money, to suddenly grow this moral guideline and be worse at their job just for the greater good.
nvivo··on Ford to cut North America, Asia salaried workers by 10 percent
As someone from a country where this happens (in Brazil it's mandatory to have employees to handle fuel pumps in order to protect jobs), I think it's crazy to even think this is a good idea. We have very expensive fuel and I'm required to wait in line because I need to wait for an employee to be there to do something I can do faster. As result, we have terrible service with an expensive price.

Jobs must exist by market demand, artificially creating jobs is the worst thing a country can do. Every law had good intentions, it's always the indirect side effects that cause problems.

nvivo··on WordPress on .NET
NPM is already supported by default for quite some time in VisualStudio.
nvivo··on WordPress on .NET
Hack is more than that. Hack solves every little stupid mistake PHP has as a language. It is a good language developed by smart people, has rules to avoid pitfalls and rules to make things more certain. It retains only the syntax of PHP, but in strict mode, hack can be compared to any other good language.
nvivo··on PgAdmin 4 v1.0 released
I completely agree with SadWebDeveloper. Postgres is seriously lacking a good UI. Or maybe another way to put it is that as someone coming from MSSQL and MySql, it seems the "postgres people" are used to a completely different way of work that feels odd to me.

Having worked with MSSQL for years, MS hit the right spot with Management Studio. It's an UI focused on writing SQL, and any wizard has a "Generate SQL for this" button. It let me write huge SQL files, save them, reopen then and run them. When I found dbForge Studio for MySql, I felt at home. I wish postgres had something like that.

Last week I went through ALL the GUIs in the postgres wiki page and found nothing good. Valentina Studio and EMS are good, but not great. EMS has a lot of features, but honestly it bothers me it cannot even use the default system font in windows, the environment it's built to run on. It's like it's stuck in 2002.

If I could sum it up, the thing I miss the most is being able to work with SQL. I want the first button in the toolbar to be a "New SQL Query" that opens a huge editor that lets me write and run SQL. Not a "new database", not "new project". Amazingly, most postgresql UIs are simply terrible at writing and running sql.

It's like postgres uis are like the PHP of database UIs: people that like it have no idea how bad they are, and the very few people go elsewhere to see how much better the world is outside.

nvivo··on Why JavaScript and PHP Won the Web – Outspeaking
You either program in php and love it, and in this case you're just part of the amateur group who don't understand what is possible in other platforms, or you're an experienced programmer who never actually did something serious with php.

Your concept of good code design is close to what I mean, but even that is not possible in php.

nvivo··on Why JavaScript and PHP Won the Web – Outspeaking
You clearly didn't get the point of the argument. Let's stop here, ok?
nvivo··on Why JavaScript and PHP Won the Web – Outspeaking
PHP itself makes it impossible to design good code. I worked with PHP about 15 years ago, left for other platforms but occasionally had to deal with PHP, and since the last year I couch a team of PHP developers, so it's part of my daily life understanding the language and it's quirks. My honest opinion is that PHP didn't change at all over the years. All the same bad smells are there, but not at the same places. The best description I've seen for this is in that old "fractal of bad design" post:

> "PHP is a community of amateurs. Very few people designing it, working on it, or writing code in it seem to know what they’re doing. Those who do grow a clue tend to drift away to other platforms, reducing the average competence of the whole. This, right here, is the biggest problem with PHP: it is absolutely the blind leading the blind."

This is so true it hurts, and unfortunately if you think "it's not like that, every platform has goods and bads, php works for me, yadda yadda yadda" you're in the amateur group. You need to work with other platforms for real to understand this. It's not "every platform has issues", it's more like "every platform has issues, and then there is php, in a different category with much deeper problems".

This is not about preferences or tastes either. It's just about looking around and seeing how common problems have already been solved. PHP7 has good exceptions, yay! Except they should have been there for 20 years. It was already a very solid concept back when PHP 1.0 was released. ES3 implemented exceptions correctly in 99 for god's sake. Every other language did too, PHP is the only kid in the block that took 20 years to understand what exceptions are supposed to mean in the language.

I could point other small things like the new DateTime API being a joke, mysqli is still supported and still converts typed data to strings, terrible encoding support, pure byte strings instead of unicode strings, inconsistencies in implementations between OSs, the compiler still acting differently depending on php.ini settings, but in the end, it all boils down to bad design.

Facebook's Hack fixes the PHP language for real in strict mode, and that is the work of real engineers thinking about stuff. PHP7 is still the same old people trying to get around without looking at proven solutions anywhere else.

And that's why you can't design good code with PHP7. It's like trying to design a good house made of turd. Doesn't matter how much you design it, in the end it will still smell terrible.

nvivo··on Why JavaScript and PHP Won the Web – Outspeaking
Once Javascript started to get popular and it was clear it was the language everybody would need to work with, experienced people from other languages started to create libraries and transpilers that would either improve or limit javascript, and a very open process of "natural selection" started to shape ES6 and ES7.

PHP on the other hand remains shaped by people that don't understand how badly designed PHP is and how the decisions that drive its design process are different from almost any other language.

ES6 onwards may be far from perfect, but it's much more shaped by experience and good practices than PHP will ever be. This counts a lot, you can currently design good code with javascript, while even PHP 7 still makes it impossible.

The fact that wordpress websites are 30% of the web masks the fact that there aren't nearly as many php developers around.

Javascript won the web, PHP didn't. PHP is just another language with decreasing popularity according to the last TIOBE index: http://www.tiobe.com/index.php/content/paperinfo/tpci/index....

nvivo··on GitHub exposes everyone's email address in GIT commits
No, it isn't github's fault or git issue. All commit metadata is used to generate (and verify) the commit hash. This is basic git functionality. If you somehow hide this piece of information, you make that repo not only unverifiable but also incompatible with any other clone, including the one in your local machine. You wouldn't be able to push to github.

The only issue here is not realizing the email field in the git config doesn't need to be your personal one or even real. And I agree more people should know this, but this is not something github or git needs to fix in any way.

nvivo··on SQL Tabs – Rich SQL Console for Postgresql
It's just an educated guess. For general stats (http://gs.statcounter.com/#desktop-os-ww-monthly-201509-2015...), 90% of the world uses windows while 10% use macs. This reflects directly at companies and large development teams. For developer stats (http://stackoverflow.com/research/developer-survey-2015#tech...), 54% use windows, 21% use macs.

I'm not stating that these stats are the ultimate sources of truth. But those are good references. If you were to measure the reality in most countries, I doubt those numbers would swap places.

In Brazil I see lots of devs using Macs too. It's just not the majority of them.

nvivo··on SQL Tabs – Rich SQL Console for Postgresql
I don't find it that hard to believe. All companies I ever saw using postgres are using windows for development.

Note that I'm not from the US, I'm from Brazil. Here windows pretty much dominates the landscape.

But this is also important: while the US is currently quite apple-centric, most countries are not. And although the US concentrates a lot of tech companies, it's still only 4% of the world.

nvivo··on SQL Tabs – Rich SQL Console for Postgresql
I agree with the idea that postgres should have better clients for Windows. It's the major reason I never used it for anything serious. Even commercial tools lack behind.

What I mostly miss is a good tool focused on writing SQL like Management Studio from MS SQL Server. Something that allows me to easily open complex large scripts in a full editor, execute parts or all of it easily and get results back. Not much gui, not many wizards, but a good experience. Most tools I find for pg are either full console or full guis with too much focus on wizards. It's like the people using it are uncomfortable with SQL for some reason.

But having followed pg for 15 years or so, I don't think they want or need to be the most popular database. They just want to be a damn good database server, and they are.

nvivo··on Browse the .NET Framework source code online
I don't think sourceof.net has previous versions, but it's quite easy to just open any assembly on ILSpy.

You won't get comments, but you can read the code very clearly.

nvivo··on Ask HN: How do I stop comparing myself to others?
Amazing post, thanks for the openness.

As I get older (I'm still 33), I realize more and more that almost nobody got their stuff together. Most people even in their 40 or 50 are still trying to figure out what to do with their lifes. They change careers, move to a different state, start writing books, start some business different from what they have done their entire life.

When I was young, I always heard that 'life is hard'. I live in a third world country, grew from a poor family and never had much money. But it wasn't until I was married working in a good company that I realized what that means.

I realized that life being hard is not about not having money or a family... these are struggles we all have. Life being hard is all about these choices you have to keep making that are not confortable at all, you can never rest, life is always changing your plans. Even when you think you have it all figured out, this will last only a few years and you will have to start again.

It's all part of life. We all have struggles and the sooner we realize that it's all about the journey and not about the ends, the easier it gets to go on.

nvivo··on Microsoft Edge gets native ECMAScript 7 async/await support in latest build
Indeed that might be the case. There are ES6 features implemented in chrome that don't work in the console (eg. classes). Still, it doesn't mean the language or the feature is doomed.

You have exactly the same issue with setTimeout. Errors will be thrown when the function runs, not when you schedule it. The problem you're describing is not an issue, and that's why today there are linters and compilers.

nvivo··on Microsoft Edge gets native ECMAScript 7 async/await support in latest build
Just being picky, but because Edge was released after all other browsers, technically there isn't any other "more modern browser". There are just the other browsers.
← PreviousPage 2 of 4Next →