Better HN
topnewbestaskshowjobs
Log inSign up

ploggingdev

2,356 karma · joined Nov 23, 2016 (10y ago) · 347 submissions

account no longer in use
Submissions

comment 9y ago · link · parent

The route from the user's browser to Cloudflare is encrypted (https), but the route between Cloudflare's servers and github pages is only http as Github does not support https for custom domains.

User <---https---> Cloudflare <---http---> Github pages

comment 9y ago · link · parent

Do the "requests" mean page views or http requests? A single page view almost always has multiple http requests.

Github really needs to add https support for custom domains. It's 2016, https should be the default.

[Reposting my comment]

comment 9y ago · link · parent

Do the "requests" mean page views or http requests? A single page view almost always has multiple http requests.

Github really needs to add https support for custom domains. It's 2016, https should be the default.

Worth mentioning that Gitlab pages supports https for custom domains. I am considering moving my blog to Gitlab. Anyone know about the resource limits and performance under Gitlab pages?

334.

Scraping my website using requests and BeautifulSoup(ploggingdev.com ↗)

3 points · by ploggingdev · 9y ago · discuss

335.

Performance measurement in Python 3(ploggingdev.com ↗)

5 points · by ploggingdev · 9y ago · discuss

336.

N queens solver in Python 3(ploggingdev.com ↗)

1 points · by ploggingdev · 9y ago · discuss

comment 9y ago · link · parent

That won't be efficient memorywise since the size of the result array is dependant on the largest value in the array of values.

Consider sorting an array of 2 large integers {65000,30000}. To sort this array, the result array will be initialized with 65000 elements. Very inefficient.

comment 9y ago · link · parent

In https://github.com/sangupta/ps/blob/master/solutions/2016/fa... the solution for fastest integer sorting is wrong.

    / build the boolean result array
    boolean[] result = new boolean[array.length];
    for(int index = 0; index < array.length; index++) {
      int num = array[index];
      result[num] = true;
    }
The result array is the same size as the original array.

But when you do:

    int num = array[index];
    result[num] = true;
The index being referenced in the result array is dependent on the value of num. So if num is greater than or equal to the length of the array, it throws an ArrayOutOfBoundsException. And what happens when you try sorting an array with elements having the same value?

Eg- try sorting {10,5,9}

Unrelated: HN needs to allow highlighting code inline.

339.

Floating point arithmetic issues in Python 3(ploggingdev.com ↗)

2 points · by ploggingdev · 9y ago · discuss

comment 9y ago · link · parent

If you are a beginner, choosing Python 3 is a no brainer.

One of the main reasons for all the hate towards Python 3 is because it is not backwards compatible with Python 2. So people who have a lot invested in Python 2 have to port the codebase to Python 3. Another issue is that some libraries have not been ported to Python 3. This is becoming less of an issue as all the major libraries have been ported to Python 3.

Anything Zed Shaw says (or anyone for that matter), cross check the facts before drawing conclusions.

comment 9y ago · link · parent

I recently started learning Python 3 and decided to blog about the journey primarily because it forces me put down what I learn in words, and it also serves as a quick reference for when I need to lookup something Python related.

Learning Python has been a very pleasant experience so far. Things I found enjoyable: dynamic typing, code readability, multiple programming paradigms it allows, not verbose (looking at you Java).

I covered the basics of the language so far, and I am yet to explore the libraries available and GUI frameworks such as Kivy. I will be building small programs to better understand the language. Some ideas: blackjack, tictactoe and I will blog about how I go about building them.

Feedback is welcome!

342.

I am learning Python 3 and blogging about my journey(ploggingdev.com ↗)

3 points · by ploggingdev · 9y ago · 1 comment

comment 9y ago · link · parent

Interesting to note the famous "hello, world" program that beginners are taught was popularized by the example used in The C Programming Language by Brian W. Kernighan and Dennis M. Ritchie.

comment 9y ago · link · parent

I don't recall sites like Google or Facebook ever being down for maintenance. Are there any articles that discuss how they manage application layer and database layer migrations?
1
89101112