<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Matej++ - Latest Comments</title><link>http://matejpp.disqus.com/</link><description></description><atom:link href="https://matejpp.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 18 Jun 2014 15:49:19 -0000</lastBuildDate><item><title>Re: Why the name red-black tree?</title><link>http://blog.matejzavrsnik.com/2012/09/why-the-name-red-black-tree/#comment-1442277384</link><description>&lt;p&gt;But what does "red" indicate? What signifies "black"?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">A.S</dc:creator><pubDate>Wed, 18 Jun 2014 15:49:19 -0000</pubDate></item><item><title>Re: My view of Coursera and Algorithms: Design and Analysis course</title><link>http://blog.matejzavrsnik.com/2012/08/my-view-of-coursera-and-algorithms-design-and-analysis-course/#comment-1356582570</link><description>&lt;p&gt;This is very inspiring. Thank you for sharing your experience with this course.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Omar Samir</dc:creator><pubDate>Sat, 26 Apr 2014 11:32:56 -0000</pubDate></item><item><title>Re: How to create tea timer for Linux console</title><link>http://blog.matejzavrsnik.com/2013/10/how-to-create-tea-timer-for-linux-console/#comment-1230009873</link><description>&lt;p&gt;Pretty cool. And just a bit ghastly. Will it work for my apple strudel, I wonder?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Greg</dc:creator><pubDate>Tue, 04 Feb 2014 04:11:37 -0000</pubDate></item><item><title>Re: Beginner&amp;#8217;s view on Python</title><link>http://blog.matejzavrsnik.com/2013/04/beginners-view-on-python/#comment-1210158487</link><description>&lt;p&gt;The 'self' parameter is only necessary on instance methods. There are the @classmethod and @staticmethod decorators if you want the method to reference class-level members or act like traditional functions.&lt;/p&gt;&lt;p&gt;Private members are denoted using a double-underscore prefix. Python will use name mangling on private members to avoid name collisions. There is no traditional usage of access keywords in Python the way you'd find in most languages because they infer implicit restrictions.&lt;/p&gt;&lt;p&gt;Strings are always passed by reference even if they act as though they're passed by value. That's typical of almost any modern language. In fact, anything that's not a scalar type is always passed by reference. Passing objects from the heap around by value is just plain inefficient and pointless.&lt;/p&gt;&lt;p&gt;UFT-8 is the default in Python 3. Many of the bugs in the transition from Python 2 to Python 3 are caused because of this change. Yes, it sucks that everything written in Python 2 can't be made compatible with Python 3. The upside is Python 3 fixes a lot of fundamental design flaws in the language.&lt;/p&gt;&lt;p&gt;Python is cross platform for most things and there are notes in the documentation outlining the os-specific parts. Considering that a python script can be copied from one OS to another and be run without re-compilation and without conflicts is a huge boon to productivity.&lt;/p&gt;&lt;p&gt;Python is not C++. You can't build custom data types using unions. You can't do pointer arithmetic. The language provides simple/sane default functionality and is considered 'fast enough' for most use cases. If you need functionality/efficiency beyond what the language offers there are facilities built-in to extend functionality using C.&lt;/p&gt;&lt;p&gt;I understand you're not trying to do a Python vs C++ comparison but you neglect to see that Python is not an OOP language. It's a dynamically typed procedural language with OOP and functional characteristics.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">evanplaice</dc:creator><pubDate>Tue, 21 Jan 2014 02:36:20 -0000</pubDate></item><item><title>Re: MFC compared to other libraries</title><link>http://blog.matejzavrsnik.com/2012/02/mfc-compared-to-other-libraries/#comment-1084439467</link><description>&lt;p&gt;CMenu l_menu;&lt;br&gt;l_menu.CreatePopupMenu();&lt;/p&gt;&lt;p&gt;l_menu.AppendMenu(MF_STRING, ID_COMMAND1, _T("ids_command_1"));&lt;br&gt;l_menu.AppendMenu(MF_STRING, ID_COMMAND2, _T("ids_command_2"));&lt;/p&gt;&lt;p&gt;	CXTPCommandBars::TrackPopupMenu(&amp;amp;l_menu, TPM_LEFTALIGN, l_point.x, l_point.y, this, 0);&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hartman</dc:creator><pubDate>Wed, 16 Oct 2013 11:00:27 -0000</pubDate></item><item><title>Re: Beginner&amp;#8217;s view on Python</title><link>http://blog.matejzavrsnik.com/2013/04/beginners-view-on-python/#comment-866904155</link><description>&lt;p&gt;'Is not' is not analogous to 'not in'. 'Is not' are just two operators juxtaposed, so 'True is not None' is true. Use 'not x is y' for negated identity testing. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">somejan</dc:creator><pubDate>Thu, 18 Apr 2013 05:33:52 -0000</pubDate></item><item><title>Re: Beginner&amp;#8217;s view on Python</title><link>http://blog.matejzavrsnik.com/2013/04/beginners-view-on-python/#comment-865387050</link><description>&lt;p&gt;Honestly, I missed this one. Thank you and the other commenter to point it out. I could still argue that a != b and a = !b are two slightly different language constructs, but I'm comparing Python too much to C++ already :) If I did that I would really be over the line nitpicking, even though all point could be viewed as such :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matej Zavrsnik</dc:creator><pubDate>Tue, 16 Apr 2013 14:50:29 -0000</pubDate></item><item><title>Re: Beginner&amp;#8217;s view on Python</title><link>http://blog.matejzavrsnik.com/2013/04/beginners-view-on-python/#comment-865384360</link><description>&lt;p&gt;I was afraid that this will sound too much like C++ vs. Python, which was not my intention. I tried simply to give a newbie view on learning the language. I did state explicitly that I have C++ background, because I would per definition miss personal biases and that at least the reader will have a chance to pick it up.&lt;/p&gt;&lt;p&gt;Encapsulation though transcends specific languages. It is one of the fundamental concepts of object-oriented programming and Python belongs to that family so it's fair game :) (On the other hand, some claim Python is more OO then even C++, since it has no primitive types.)&lt;/p&gt;&lt;p&gt;As for changing the language, I was informed I was introduced to the language right in the middle of delicate time and that it has always been reliably backward compatible.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matej Zavrsnik</dc:creator><pubDate>Tue, 16 Apr 2013 14:47:18 -0000</pubDate></item><item><title>Re: Beginner&amp;#8217;s view on Python</title><link>http://blog.matejzavrsnik.com/2013/04/beginners-view-on-python/#comment-865105385</link><description>&lt;p&gt;Sorry for being a terse, but I think most of this boils down to Python not being C++, like you're used to. Some other items:&lt;/p&gt;&lt;p&gt;2) Because it simplifies the language considerably. I think Lua's use of obj:method() is even nicer, even if I do make a lot of mistakes that way, the first day.&lt;/p&gt;&lt;p&gt;3) Fixed in Python3.&lt;/p&gt;&lt;p&gt;4) Everything is by reference, but some things, like strings and tuples, are immutable.&lt;/p&gt;&lt;p&gt;6) "not is" is called "is not"&lt;/p&gt;&lt;p&gt;7) yes, consistency (and sometimes quality) in the standard library is an issue. Considerably less so than (earlier, at least) java, but still.&lt;/p&gt;&lt;p&gt;8) If you need the language to enforce encapsulation, you have way, way bigger problems. Usually we just prefix private names with underscore.&lt;/p&gt;&lt;p&gt;9) If you really mean FooClass.method you can always call it that way, but that's rare. Unless you're trying to write your code to deal the problem of your fellow programmers, in which case, again you have way, way bigger problems.&lt;/p&gt;&lt;p&gt;10) Lists are mutable, and you asked for a list of three of that list. I agree it's a bit surprising for a beginner, but what do you think it should do instead? You've already created the inner list when it's presented to the outer list, so are there some semantics that would be less surprising?&lt;/p&gt;&lt;p&gt;11) Yep. Platforms are slightly different. Some things are done differently in windows. It could also be the case that fewer things are in the standard library for windows.&lt;/p&gt;&lt;p&gt;12) Sure. There are changes, but not fast enough to cause any major problems, even on large codebases. And you can always just use an older python. (well, maybe windows dll-hell is screwier than on most os:es, I wouldn't know)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">aes</dc:creator><pubDate>Tue, 16 Apr 2013 09:03:24 -0000</pubDate></item><item><title>Re: Beginner&amp;#8217;s view on Python</title><link>http://blog.matejzavrsnik.com/2013/04/beginners-view-on-python/#comment-865095269</link><description>&lt;p&gt;Also keep in mind that "is" is identity test, not equality&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">grizwako</dc:creator><pubDate>Tue, 16 Apr 2013 08:48:56 -0000</pubDate></item><item><title>Re: Beginner&amp;#8217;s view on Python</title><link>http://blog.matejzavrsnik.com/2013/04/beginners-view-on-python/#comment-865094389</link><description>&lt;p&gt;There is "is not", while you were trying "not is".&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">grizwako</dc:creator><pubDate>Tue, 16 Apr 2013 08:47:35 -0000</pubDate></item><item><title>Re: How I implemented language aware web scraper</title><link>http://blog.matejzavrsnik.com/2013/02/how-i-implemented-language-aware-web-scraper/#comment-798975623</link><description>&lt;p&gt;Thank you.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matej Zavrsnik</dc:creator><pubDate>Thu, 14 Feb 2013 07:18:14 -0000</pubDate></item><item><title>Re: How I implemented language aware web scraper</title><link>http://blog.matejzavrsnik.com/2013/02/how-i-implemented-language-aware-web-scraper/#comment-798886796</link><description>&lt;p&gt;interesting and informative.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex</dc:creator><pubDate>Thu, 14 Feb 2013 05:30:12 -0000</pubDate></item><item><title>Re: Attempt to find modulo bias in .NET randomization</title><link>http://blog.matejzavrsnik.com/2012/06/attempt-to-find-modulo-bias-in-net-randomization/#comment-562229408</link><description>&lt;p&gt;I didn't know about dotNetPeek before. Thank you for pointing that out, along with the type of algorithm behind the tested function. I will add an edit section with this information somewhere near top, to save people some reading :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matej Zavrsnik</dc:creator><pubDate>Tue, 19 Jun 2012 17:37:37 -0000</pubDate></item><item><title>Re: Attempt to find modulo bias in .NET randomization</title><link>http://blog.matejzavrsnik.com/2012/06/attempt-to-find-modulo-bias-in-net-randomization/#comment-561900012</link><description>&lt;p&gt;Just look into the implementation of Random in mscorlib.dll using dotNetPeek and you'll that Random.Next(max) is not implemented using moduolo, but is implemeted by converting an int in the range [0,2147483647) into a double in the range [0,1), then multiplying that out to the range [0,max). This intorduces slight bias for numerical analysis reasons for some values of max, but is not moduolo bias.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Chris</dc:creator><pubDate>Tue, 19 Jun 2012 10:15:11 -0000</pubDate></item></channel></rss>