News for hackers. Stuff that matters.

koshak

Re:So Long, Macbook. Hello Again, Linux on Friday January 11, 2019 @07:29AM (#18883064)
My phone is coupled with my laptop. All my settings are backed up. All my docs, pics, music, random files all are synced with “cloud”. If my laptop or my phone gets hit by a bus I will go to the nearest shop, get a new device and get it set up from backup within an hour.

I delegated the fine tuning and customization to a third party once I realized I don’t have time for it anymore.

I am fine with it although it is not ideal and there is room for improvement. There is always some. Everywhere.

Please ping me from future when Linux (or Fuchsia or whatever is there in the second half of 2020s) is capable of that as well and there are vendors/providers who are honest, dependable and trusted who I can allow to store my data, identity and privacy and have good sleep.

Cheers.

Re:lsix: ls for images on Thursday December 27, 2018 @02:08AM (#18767973)
Every time I see the word beginning from sumbol "l" I can’t tell whether it is "l" or "I"

The only font designers who care about clear distinction of symbols are those who create fonts for coders

Simple clarity test:

Il10O

All 5 chars should have clear distinction. Otherwise the font is shit.

Re:The latest on Messages, Allo, Duo and Hangouts on Thursday December 06, 2018 @01:36AM (#18615920)
Google has clearly got internal problems with their product management. It is a well-known fact that the fewer options you have the easier the choice. Once you have to choose between similar things with intersecting feature sets you find yourself in the center of uncomfortable mess. And there is no one to blame but those who make high level decisions in Google.
Re:Should you use www or not in your domain? (2017) on Monday November 12, 2018 @01:15PM (#18434390)
In the honor of bikeshedding once a year someone writes an article on the www/non-www topic.

The truth is: 1. No one cares 2. Choose one of two and stick to it 3. Care to maintain a redirect from the second option to the chosen one.

Cheers!

Re:Migrating to Python 3 with pleasure on Monday February 05, 2018 @04:27PM (#16312354)
I really like this one. “So you already have your turing complete language! What else do you need?”
Re:Amazon EKS – Highly available and scalable Kubernetes service on Wednesday November 29, 2017 @03:57PM (#15810769)
What region were you living in?
or at least provide a skeleton config with commented out and thoroughly explained options like this one http://download.redis.io/redis-stable/redis.conf
Re:Google – My Activity on Tuesday November 08, 2016 @09:02AM (#12900250)
>Sie haben die Kontrolle

>Sie können ganz einfach einzelne Einträge oder ganze Themenbereiche löschen. Außerdem können Sie in den Einstellungen festlegen, welche Daten mit Ihrem Konto verknüpft werden sollen.

In two out of three occurrences I read "Sie" as "They" )) Fun!

Re:The Road to 2M Websocket Connections in Phoenix on Wednesday November 04, 2015 @09:40AM (#10506830)
that's why this benchmark seems irrelevant.
Re:Learn Python the Hard Way on Friday March 27, 2015 @08:42PM (#9279981)
1. using context manager when working with io has two pros: no need to think about freeing resources, good style.

2. '{}'.format(). besides, print is a function

3. python versions you use as a ref in your book were released more than 5 years ago. All major projects have dropped support for them in favor of python 3.3+. Today it is difficult to find a project that doesn't support python3. There's not so much diff between py3.4 and py2.7. What is frustrating?

4. Occam's razor and K.I.S.S. tell me keep my stack as small as I can. Beginners better learn right principles than "easiness". Show them what's really effective. Programming is 95% mental work, 1% coding, 4% testing/debugging/optimizing. Teacher cannot inject knowledge into student's mind, but he can show the right direction and help make first steps.

5. comprehensions are idiomatic. context managers are idiomatic. Begin from the beginning. Begin from "import this".

6. well, yes. Your "they will learn that later" mantra is one of them.

I ditched the idea that learning programming begins with choosing a language and learning its basics. Instead you go learn KISS, DRY, YAGNI, etc., history of programming languages, stateful vs stateless, and learn this by practice, by exercise, just like playing the guitar. You begin with handling the instrument the right way and learning basics of music theory and once you get the idea of pentatonic scale and bebop you can go practice it, not vice versa. Well, you can play bebop in pentatonic and not be aware of what you're doing, but understanding the underlying theory and alternative approaches is the key to learning more complex things and discovering new horizons.

Relearning is a bad habit. Reusing your knowledge and expereince is a good one.

Re:Learn Python the Hard Way on Friday March 27, 2015 @01:08PM (#9277567)
I learned programming from Pascal. It was at school.

Later on I was taught some C and x8086 assembly. I needed to forget Pascal. But I didn't get C.

Then I was introduced to OOP and C++ and was pissed off. I needed to forget procedural programming (at that time I didn't even know it was called that). But I didn't get it.

When I started to learn Python I dove deep in its OOP, data model, magic methods, functools, itertools, datatypes, any "writing idiomatic" and "top mistakes python programmers make" articles. When I didn't understand something (and it was a lot!), I walked to read theory about programming approaches, duck typing, functional programming, Guido disgusted by functional programming, difference and tragedy of py2/3 dichotomy, by the way learning a lot about programming, design patterns, computer science and history of all of that.

When I started all my knowledge about programming before learning python this way was just buzz words and almost no real experience.

But learning python this way - the hard way - allowed me to learn programming, its theoretical concepts. When I got stuck with something, I just hadn't move on till I understood everything the right way.

Where do you teach your readers to think right?

Re:Learn Python the Hard Way on Friday March 27, 2015 @12:12PM (#9277136)
it is. regardless of python3 progress. But nowadays it's easier to name the project that does not support python3 http://py3readiness.org/
Re:Learn Python the Hard Way on Friday March 27, 2015 @12:06PM (#9277091)
Python 2.5.1

Python 2.6.5

no use of context managers when working with files

no use of format when working with text formatting and output

"Avoid any project that mentions "Python 3""

"Every if-statement must have an else"

no list|dict|generator|set comprehensions.

no idiomatic hints

no gotchas.

Definitely a hard way.

Having learnt wrong leads to hard learning to do right.

Re:The Python I Would Like To See on Wednesday August 20, 2014 @01:30AM (#8201200)
If they were ok why should they had forked python?
Re:No Russian on Monday July 21, 2014 @03:26AM (#8062840)
Is HN a proper place to feed politic trolls?
Re:OS X 10.9.3 Is Toxic on Friday May 23, 2014 @06:12PM (#7791631)
The only reason I ever get bsods since windows xp is hardware problems. hence if you see bsod check out your box, do not blame windows. moreover, kernel panics on linux boxes are also most of the times hardware bound or you've broken something yourself.
Re:Rules for Learning Foreign Languages in Record Time on Thursday March 13, 2014 @10:00AM (#7391791)
All languages divide into groups. It's always easier to learn foreign language of your group. For example if you are an English speaker, you can start with German. Then look at Dutch. They have more or less same grammar rules. After that if you've had enough zeal and curiosity, you can probably understand main rules of forming words, split unknown words into lexical units and morphemes. That said you can move to the next level - French, Italian and Spanish. Italian and Spanish can be learnt simultaniously. It's hard, but as the languages have a lot in common, it will be interesting.

My native language is Russian. I can understand and speak Ukranian, Belorussian, Chech, Serbian. Just because they have a lot in common. And vice versa. But not always...

Well the only rule to succeed as already mentioned is to dive into language. People who move to other countries usually learn to speak foreign language within several months.

But as far as we live in Internet you can learn whatever you want without actually moving. Every day we read thousands of sentences and 10s thousands of words. You can read the same in the language you want to learn. Facebook, twitter, google, newsfeeds, search for the information you want in the language you want to know and read articles.

The more you read the more you learn and soon you'll be able to form your phrases. As soon as you can form phrases and understand what you read without searching every word in dictionary, you're ready to dive into grammar. Learn grammar as fast as possible now. That's the hardest and the most exhausting part of my method, but it is obligatory. Learn rules, draw tables with tenses, declension rules and so on. Find grammar exercises and do them all. Thus you train your brain to form phrases the right way, to spell the right way.

Next part is fun part - pronunciation. It's fun because in real life you sometimes can't understand your neighbour, and dialects divide your country to sort of "language provinces". In russian language there's no English sound "th". It transformed to 'f'(Theodor - Федор) and 't' (thriller - триллер). So placing tongue between teeth is a hard but funny part for newbies. It's also funny to learn to pronounce 'r' in German, English and French. You will learn a lot about your tongue and jaw.

Last part is a "separate thread" part because learning new words is a constant process. Sometimes it's also a funny part. For example in chech the word hallway(chodba) is pronounced exactly like russian word ходьба (walking) and german 'Herr' (Mr.) is pronounced like russian 'penis', so "Herr Ivanov, sitzen Sie bitte" sounds funny. And spanish 'huesos' (bones) is the transliteration of 'хуесос' (dicksucker). Apart from that there are a lot of words common for all european languages.

That's what I do. It's a slow and silent method for learning foreign language on your own. It's like progressive jpeg. The harder you work the better the result. But every next language is learnt faster than previous.

Re:Putin on the Ritz on Wednesday February 19, 2014 @10:56AM (#7264182)
Re:Revolution in Kiev on Monday January 27, 2014 @09:55AM (#7130540)
I'm very sorry that our slavic neighbours behave so badly. It is not a revolution, it's the rampage of anarchy and laziness. Just another approval of the 95% rule. Ukraine has no strong elite. People who come to power are just short-sighted beggars. They see the golden antelope and ask her for gold, more gold[1]. And finish like the greedy raja. That's obvious and predictable.

It's the greatest diplomatic failure to push dumb poor people to power. Hi there, western polittechnology! Look at Egypt, Libya, Tunisia, Ukraine(so-called "orange revo" in 2004 and now - just the same) Promote quasi-democracy and push the weak leader to power. You'll get unstabilized entity, unable to produce any decent products or services and... just.. repeat when it seems to get a little stronger than needed?!

If you want a real success story, read the fucking history of http://en.wikipedia.org/wiki/October_Revolution Well that's the real deal. Just this for instance: "The Russian Empire, which had withdrawn from the war in 1917 after the October Revolution, lost much of its western frontier as the newly independent nations of Estonia, Finland, Latvia, Lithuania, and Poland were carved from it. Romania took control of Bessarabia in April 1918."

[1] http://www.youtube.com/watch?v=OWsP71Odht4

Re:About Python 3 on Tuesday December 31, 2013 @05:09AM (#6989855)
about python 3:

  $ python
  Python 3.3.3 (default, Nov 26 2013, 13:33:18) 
  [GCC 4.8.2] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import timeit
  >>> timeit.repeat('for i in range(100): i**2', repeat=3, number=100000)
  [4.451958370991633, 4.446133581004688, 4.4439384159923065]
  >>> timeit.repeat('for i in range(100): pow(i,2)', repeat=3, number=100000)
  [5.343420933000743, 5.341413081012433, 5.3455389970040414]
  >>> timeit.repeat('for i in range(100): i*i', repeat=3, number=100000)
  [0.8348780410015024, 0.8323301089985762, 0.8313860019989079]

  $ python2
  Python 2.7.6 (default, Nov 26 2013, 12:52:49) 
  [GCC 4.8.2] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import timeit
  >>> timeit.repeat('for i in range(100): i**2', repeat=3, number=100000)
  [0.9710979461669922, 0.9630119800567627, 0.9619340896606445]
  >>> timeit.repeat('for i in range(100): pow(i,2)', repeat=3, number=100000)
  [1.7429649829864502, 1.7306430339813232, 1.729590892791748]
  >>> timeit.repeat('for i in range(100): i*i', repeat=3, number=100000)
  [0.6579899787902832, 0.6526930332183838, 0.6540830135345459] 

  $ python -m timeit '"-".join(str(n) for n in range(100))'; python -m timeit '"-".join([str(n) for n in range(100)])'; python -m timeit '"-".join(map(str, range(100)))'
  10000 loops, best of 3: 49.4 usec per loop
  10000 loops, best of 3: 40.6 usec per loop
  10000 loops, best of 3: 32.8 usec per loop

  $ python2 -m timeit '"-".join(str(n) for n in range(100))'; python2 -m timeit '"-".join([str(n) for n in range(100)])'; python2 -m timeit '"-".join(map(str, range(100)))' 
  10000 loops, best of 3: 30.2 usec per loop
  10000 loops, best of 3: 25 usec per loop
  10000 loops, best of 3: 19.4 usec per loop

  $ uname -rom
  3.12.6-1-ARCH x86_64 GNU/Linux
Re:The real use of money is to buy freedom on Wednesday December 25, 2013 @06:35AM (#6962826)
strange that here's such a hype around this article. Money is a tool. That's it. Use that tool. If you begin to worship a hammer, you're fucked. If you see people who are fucked, help them for the first time. If you see that they like being fucked, then these people are tool. Use that tool.
Re:Why Russians Are Not Smiling (2011) on Tuesday November 19, 2013 @06:08AM (#6760410)
so faaat!...
Re:Why Russians Are Not Smiling (2011) on Tuesday November 19, 2013 @06:04AM (#6760393)
It's disappointing for me to read such things from "former compatriots".

For all the others. The article is not BS. It's a good attempt to troll on the old myth.

Re:This is a web page on Thursday June 20, 2013 @03:25PM (#5914310)
not technology but tool. apple // was tool. It is obsolete. Netscape was a tool. Obsolete. Is TCP/IP obsolete?

The trend of today is sticky headers. Tomorrow it will look rediculuous. Is it tech? No. It's the matter of fashion.

Re:This is a web page on Thursday June 20, 2013 @03:06PM (#5914160)
seems like echo of http://mnmlist.com/w
Re:Coffee vs. beer: which drink makes you more creative? on Wednesday May 29, 2013 @06:06PM (#5789514)
Green gunpowder FTW!
Can anyone count those who read translations without link to the original article or to the HN discussion?...

Do this stats make any sense at all?

Rephrase: can anyone count positive effect of the articles mentioned on HN and further discussions to them?

Older »