![]() ![]() I’m not claiming that there actually are languages for which “the pain of developing the app” grows exactly O(log n) or O(n^2) with the “size of the app” – that wouldn’t make much sense anyway since I haven’t given a precise definition of “pain” and “size”. Often more complex algorithms are required to achieve better asymptotic behavior and the additional book keeping leads to a slowdown for simple cases (small n).Ĭonnecting the dots, language A would be the O(log n) curve that starts high but grows slowly while language B would be O(n^2) which starts low but grows fast. It is no accident that the curve of O(log n) starts higher: The figure shows O(n^2), O(n) and O(log n). It is a way of describing how much resources (CPU cycles, memory) an algorithm uses for some very big input size “n”.įor example if the algorithm has to sort a list of names alphabetically “n” would be the number of names on that list. That means the pain of coding in B grows asymptotically faster than the pain of coding in A for large applications.Īnother concept concerning asymptotic behavior is big O notation. it makes writing huge, complex programs easier than language B which makes hello world easy. ![]() ![]() Of course it doesn’t teach you much about programming and proponents of language A in which hello world is cumbersome will tell you that their language of choice “scales better” i.e. Printing “Hello world!” to the screen is easy enough in just about any language to be written in a few lines of code and is therefore the first program most beginners write. I will point out some parallels in different parts of computing that I haven’t seen mentioned as well as analyze some well known rules of thumb and link to interesting blogs and articles. This series is meant to fill that void and hopefully start a lot of discussions that are more enlightening than the articles themselves. What I feel is sorely missing is a kind of article that deliberately sacrifices the last 10% of precision that make the theoretical articles dry and long winded but still makes a point and discusses the various trade offs involved. There’s a lot of very abstract writing about programming languages and a lot of simple minded “language X sux!” style blog posts by people who know next to nothing about programming. This series is aimed at programming language aficionados. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |