HNHacker News
TopNewBestAskShowJobs

dgregd

399 karma · joined January 31, 2010

submissionscomments
dgregd··on Ask HN: For those programming 10+ years, what do you wish you knew 4 years in?
Take care of your health. Sitting long hours damages your spine. I learned this too late.
dgregd··on Cyberattacks in 12 Nations Said to Use Leaked N.S.A. Hacking Tool
> This shows that no agency is immune from leaks

That's well known for a long time. During cold war a lot of Russian weapons were based on the US designs. There is a TV series, Americans, which shows how to manipulate people and steal secrets. Even atomic bomb secrets were stolen (by Klaus Fuchs and others).

So I guess a lot of people in military complex make a lot of money on these exploits, PRISM and other projects. And they just don't care about whole society.

dgregd··on Build Yourself a Redux
I've seen and understand Redux TO DO examples.

However I develop enterprise CRM app. In db there are 200k client records, 500k sales calls records. It is implemented as a standard Ruby on Rails / Postgresql web app. It works quite well. It is also pretty straightforward to implement a such app in a Java/PHP MVC framework.

Let's say I would like to implement UI using React/Redux. How should I start? For example the app has calendar month view, for each day there are 20 sales calls. So the month view has 400 sales calls and clients data displayed (date, time, client name, target group).

Do I have to put 400 sales calls and 400 clients data to a Redux store to display the calendar month view? What about client data search results and pagination? In just few clicks a user can display hundreds of clients records (thousands in case of results map view). Do they belong to a Redux store? If a user modifies one sales call record, how it is persisted in central DB? What about edge cases where some uniqueness conditions have to be checked on central DB level?

Rails covers all things needed to implement my medium CRM app. When I read Redux TO DO tutorials I have a filling that they cover just 10% of what is needed to implement a full CRM app. Could you please direct me to Redux examples / tutorials how to implement a full enterprise database app (SugarCRM scale).

PS. to down voters, please write a few words what is wrong with my questions so I can learn what is appropriate to post on HN

dgregd··on The Electric-Car Boom Is Real
> The minimum size for 6 doors is probably about the size of a long-wheelbase Transit van

Depends on the mini-bus layout. 7-seater VW Touran (4527 mm long) has 5 doors. So maybe it possible to build 5 m long van with 6 doors, with 2 on the back.

> Won't help in really dense cities like London where traffic is at walking pace

Dedicated lanes and some regulations will be needed. For example mini-bus shouldn't be allowed to enter crowded routes unless it has 3 passengers. So two people would have to wait 5 min for the third passenger and so on. Or it can be used to transport people from suburbs to subway stations in cities like London.

dgregd··on The Electric-Car Boom Is Real
That's why I would like to see a hybrid of a electric van and Uber as a new city bus. The bus should have 6 doors and separated passenger space. So each passenger would have its own private space. Travel time should be much shorter due to using fast lanes and low number of bus stops. During rush hours the bus should take 5 passengers (6 with self-driving technology). Because of small size it should economic enough to use the bus only for one passenger, even in suburbs. Uber like software should be used for costs optimization, for example you could wait for the bus in front of your house or walk 500 meters closer to the main road to save $5. All needed technology already exists. No need to dig tunnels.

PS. In Central and Northern Europe bikes are only useful for 4 months a year.

PS2. I don't want to discuss how many days per year someone can ride an e-bike to work. Some sort of public / car transport is and will be needed. There is no much innovation in public bus transport therefore I described the idea about electric van / Uber hybrid.

dgregd··on RIP Turkey, 1921 – 2017
If you are really worried about this then stop reading mainstream news propaganda, especially GW, TVN24, Newsweek. Poland leaving EU is the newest oposition narrative to discredit current government. That's all. People don't care about TK any longer so oposition created the new faked news.
dgregd··on Samsung's Tizen is riddled with security flaws, amateurishly written
There are a lot of good software engineers in Warsaw, working at various companies. However most of companies here doesn't care that much about top talent. They just want to pay an average salary and that's all.

It is very rare that Warsaw devs that write good quality code are compensated appropriately.

dgregd··on It is done, the PostgreSQL community rocks
What kind of load (number of concurrent app users) your app has so it needs multi-master db?

It is quite easy to setup powerful pg master node (32 CPU threads, fast SSDs) and many slave nodes for read-only queries. That setup can handle quite a lot of transactions.

dgregd··on What I Heard from Trump Supporters
> but almost none of them wanted me to use their names

Half of their beliefs leftists treat like heresy. So nobody wants to be hunted by inquisitors.

> as she worried she’d lose her job

Hopefully nowadays for heresy you are just fired.

dgregd··on I'm Loyal to Nothing Except the Dream
> Trust me, the alternative is much worse

The alternative is French Revolution. Hopefully for leftist elite democracy is still working.

dgregd··on I'm Loyal to Nothing Except the Dream
> problems came back after 8 years, worse than ever

Please give some real examples what problems came back after that 8 years. In live in Poland and haven't noticed any particular change to worse in last year.

dgregd··on Trump’s Next Move on Immigration to Hit Closer to Home for Tech
I have a question to tech companies CEOs, who make so much noise about Trump latest executive order.

If you really care that much about Muslim countries then explain to me: why the PhD brain drain is so good for these countries?

dgregd··on My Next Mac Mini
I ask myself the same questions. It seems that Apple is lost in internal politics.

It was right decision at the time to build the new OS only for mobile devices. But now laptops and desktops have also touch screens. It was easy to foresee this. So Microsoft decision to build touch OS for laptops and desktops payed off. But who at Apple will take the blame for the decision made 5 years ago to still have two separate OSes? I guess it is safer to continue Steve Jobs vision, even knowing that Steve often changed his mind.

That lack of Mac Mini internals upgrade is really insane. It seems that no exec wants to be associated with that simple project. In most innovative and valuable company everyone has to work on something revolutionary, otherwise someone will be not considered as the right person for Apple.

I guess that "laser focus" and "saying no" are now mostly used in internal office fights.

dgregd··on Time to Take a Stand
I live in Central Europe. It is really hard from my perspective to understand all that mass hysteria in US, especially in California. Maybe overdosing leftist propaganda causes that hysteria.

Many products of Silicon Valley and Hollywood companies are simply blocked in China. Mainly to protect Chinese young companies. As far I known Google is completely blocked in China. Hollywood movies are also not freely distributed in China. And for some reason it is Trump accused of acting against free trade. What should be the right reaction for Chinese protectionism? More know-how transfer to the land of democracy?

And if you really care about Muslim countries then explain to me: why the PhD brain drain is so good for these countries?

dgregd··on What the Heck Is Happening at Apple?
> but I'll make it again just for you. Mac laptops are sturdy, well made devices

You misunderstood me. I agree that Apple products have the best build quality. But Apple was always something more than a well build luxury product. MacBook Pro was a tool used by professionals to create good things. Without professionals, it is just another luxury product. And ordinary luxury product won't have that high sales.

dgregd··on What the Heck Is Happening at Apple?
> What frustrates me the most is that Apple never admits a mistake

In corporate politics that would be a suicide. Only Jobs was powerful enough to make mistakes.

Anyway it is shocking what Apple does now. During Jobs Apple removed product features only used by laggards. Now Apple removes the features used even by pragmatists and early adopters[1]. Do you known how many people moved exclusively to wireless headphones and TH3?

Another surprising thing is ignoring the professionals. They are in minority and it is hard to see them on sales charts. But they are opinion leaders.

Many people overpay for Apple products because they want to look as real professionals. Majority don't care which laptop is the thinnest, they use products used by opinion leadres. With current trend, in 5 years Apple brand might be associated with rich bozos buying gold phones. Just look at the Mercedes S vs Tesla Models S sales in last 2 years.

[1] https://en.wikipedia.org/wiki/Crossing_the_Chasm

dgregd··on The 2016 Election
I live in central Europe. It is really sad to see so many manipulated people in the US by politics propaganda. 90% of people support Clinton/Trump because they dislike the other candidate more. That's it. Why do you offend each other? Both candidates aren't very good, so to speak.

The real problem is the current political system. I would like to see some innovation here on HN, what can be done to unleash the potential of the wisdom of crowds, also in politics, similary what open source, stackoverflow, github etc. did for software engineering.

PS. East Germany producted two awful cars: Trabant and Wartburg. But car owners were not offending owners of the other brand. Everybody knew that the socialist system was bad.

https://en.m.wikipedia.org/wiki/The_Wisdom_of_Crowds

dgregd··on Reasons to choose PostgreSQL 9.6
> I always wondered why MySQL gained more popularity.

Because of the first-mover advantage. When first web pages/apps were created there was no native port of Postgresql for Microsoft Windows. At that time Windows was the main development platform. Postgresql with Windows native support was released in 2005.

https://www.postgresql.org/docs/8.0/static/release-8-0.html

dgregd··on Practice Doesn't Make Perfect
My summary of the whole discussion:

genius_level = talent_genes * hard_work * know_how

talent_genes - natural ability to be good at something

hard_work - amount of practice, willingness to practice hard is determined by genes, but can be also artificially increased by the demanding parents or trainers

know_how - knowledge of discipline secrets by coaches or teachers

dgregd··on Major features of PostgreSQL 9.6 [pdf]
> If you think backup tools are a minus for PG, I guess you've never used barman

You are right, I've never used barman. But I have streaming replication configured manually. Generally I am quite happy with PG backup tools.

However this discussion made me to think about pg_dump deficiencies. WAL backup is for whole db cluster. But how do I incrementally update one db? E.g. one prod db to my dev environment.

dgregd··on Major features of PostgreSQL 9.6 [pdf]
> What's wrong with WAL backup?

I use PG for 10 years and I never needed incremental backups. But if someone asked me about it then I would respond that the PG has no incremental backups.

So WAL backup is not well known or documented in my opinion. An average db admin needs a tool which will generate incremental backup as a single file named like dbname_20160926.sql

dgregd··on Major features of PostgreSQL 9.6 [pdf]
> why companies are still paying for commercial DBMS engines

In my experience in 90% of cases application code migration to a new db engine is the real road block.

I've seem many cases where even migration to a new Oracle version is a huge problem because of required app code review and full user acceptance tests. So companies pay licence fees for old unsupported versions. What is even more absurd.

And frankly speaking in many cases of simple apps even SQLite has all necessary features in replace Oracle.

dgregd··on The decline of Stack Overflow (2015)
Yes, SO search is average quality. Therefore I add site:stackoverflow.com to all my google searches.
dgregd··on iPhone 7
Probably performance of A8 for most of people is good enough. At least for native apps.
dgregd··on The neurology of self-awareness
We already know that we are very similar to animals. Our mind and consciousness are last things that distinguishes us. We are strongly attached to this idea. It was hard for people to accept the fact that the Earth is not the center of the universe, and despite the simple explanation of the phenomena that surround us.

Regarding consciousness there is too much philosophical discussion. Wordplays of which little is clear.

The sense of sight has exhausted such emotions. We are able to say that a simple multicellular organism having one photosensitive cell is a primitive ancestor of the eye.

What do you say if we define consciousness as the next sense, but in contrast to other senses directed to the center, that is, to our memory.

dgregd··on CEO Larry Page defends Google on the stand: “Declaring code is not code”
What about Oracle Linux and Bash on Windows?
dgregd··on Merkel Grants Turkish Request to Prosecute German Satirist
> I just can't understand why Merkel would care what he thinks?

Because Turkey is one of the main passages of immigrants to Europe. And Erdogan can limit the number of immigrants passing EU border. Turkey already got 6 billions Euro from EU to keep immigrants at their country.

In politics two things matter: (a) what you can give me (b) how you can harm me

Of course Erdogan can make further requests because Turkey still have these immigrants.

dgregd··on My simplified response to Paul Graham's simplified essay
PG:"We will not do a good job of fixing the bad causes of economic inequality unless we attack them directly.

But if we fix all the bad causes of economic inequality, we will still have increasing levels of it, due to the increasing power of technology"

I still don't get what PG is trying to say.

For example few years ago Google and Apple bosses made secret agreement to not hire employees of the competing company. The goal was to transfer wealth from engineers to shareholders and bosses. There are a lot of other examples. That's why the essay had so much negative comments. PG should clearly condemn these practices.

PG:"we will still have increasing levels of it, due to the increasing power of technology"

That is just narrow VC point of view. Think about what cheap printing technology did for our civilization. There are countless of other examples. Today UK monarchy can only dream about the power they had.

I had a dream that the technology (Internet, DVCS ...) will make legislation process more transparent. Tax loophole? Just file a bug, propose a fix, vote for the fix. Think about what Stack Overflow and Github did for software development. Something similar can be done for the law.

dgregd··on Postmortem: Server compromised due to publicly accessible Redis
The most important thing to do after a server setup is to enable firewall. By default block all ports on public IP and then open ssh, http and https. There are tools like ufw, just few commands and your server is secure. This is much better approach than securing all services and system deamons run on a server.
dgregd··on Android Audio Latency
Actually Android standard doesn't include ALSA. There is a thin sound HAL above ALSA, OSS and other Linux sound technologies.

Of course many phone vendors use ALSA to implement Android HAL layer. It seems that Samsung uses its own sound drivers and therefore they have small audio latency compared to other Android vendors.

← PreviousPage 3 of 8Next →