How I Got to the App Store Top With a Simple Currency App
Written by Valentin Shamardin
I will tell you how I’ve created quite an ordinary and not at all innovative application that has become objectively the best of its kind and even has been at the very top of the top for some time. It’s not a success story and not a guide for action. I just want to tell you how I developed the...
Clojure. Transducers, Reducers and Other Stuff
Written by Andrei Zhlobich
Transducers have become quite popular recently. It’s a new feature of the non-released Clojure 1.7. As of writing this, Сlojure 1.7-alpha5 version is the latest development release, but there also appeared a fair number of ports of transducers for such languages as Python , Ruby , JavaScript , PHP , Java , C++ , Lua , Erlang . To tell the truth, it’s a bit disconcerting, the library of reducers was added long ago (in Clojure 1.5). But no one said anything about them; nothing was ported, though they seem to be performing similar things. Or not? Let’s find out what these reducers & transducers are made for (do we really need them?), how they work and how we can use them… Finally, we will decide whether it’s time to throw reducers away. It would be wrong to describe concepts emerged in Clojure outside the context of the givenWhy Pay-per-Word Just Doesn’t Work for Tech Blogging
Written by Rockin'Robin
Tech blogging is on the rise though most of startups see it as a secondary thing. They’re totally right but there’s one condition to it — it requires skill as well as time. A lot of companies are comfortable with solving this problem by outsourcing content creation and hiring agencies or...
The Nth Fibonacci Number in O(log N)
Written by Ivan Yurchenko
Reading an article about getting a job in ABBYY, I came across the following task: Find the Nth Fibonacci Number in O(N) time of arithmetic operations. Thinking about it, I realized that the only solutions coming to my mind were those operating in O(n) time. But I found a better solution later. I am going to use the following denotation of sets: - non-negative integers — positive integers According to various mathematic traditions, a set of natural numbers can either contain 0 or not. Therefore, it’s preferred to indicate it explicitly in international mathematic texts. The Solution Donald E. Knuth provides a matrix identity of the following form: The identity is provided without any proof, but it’s quite easy to prove it by induction. The matrix on the right is called Q-matrix. Let’s indicate: According to the identity, . Thus, to calculate , we should calculate matrix and take the firstRadix Trees
Written by Nikolai Ershov
Having read some articles about tries (aka prefix trees aka radix trees), I decided to write one of my own. Today we are going to talk about a trie implementation in C++. We will also compare a string search with AVL and Radix tree. Intro A trie is an ordered tree data structure that is used to store a dynamic set or associative array where the keys are usually strings. We are going to take a look at the implementation of prefix trees for storing ASCII strings. Each string ends with a terminal symbol that will never repeat in a string again. To indicate terminal symbols in pictures and examples, we will use the dollar sign. To indicate them in the code, we’re going to use the null symbol. Thus, in our implementation the strings will be standard C ones, which allows to use the standard string.h library. All the mentioned above shouldTransactional Memory: History and Development
Written by JIghtuse
Definition Parallel programming is difficult. When using systems with common memory, you can’t go without synchronization of parallel processes/threads access to the common resource (memory). The following are used for it: locks (mutex); lock-free algorithms (lockless); transactional memory. Transactional memory is a technology of concurrent threads synchronization. It simplifies the parallel programming by extracting instruction groups to atomic transactions. Concurrent threads operate paralleled till they start to modify the same memory chunk. For example, operations of nodes adding to the red/black tree (animation in the heading) can operate in parallel in several threads. /* Move item from one list to another */ int move(list *from, list *to) { __transaction_atomic { node *n = pop(from); push(to, n); } } Concurrency management approach with transactional memory use is called optimistic: we think that threads operate independently of one another and rarely change the same data. In this case most transactions are1,000,000 Views of Your Company's Blog: 5 Tips
Written by Alexander Lashkov
Each and every day thousands of co’s around the world setup their corporate blogs but most of them fail to deliver useful and interesting content. Those who succeed usually tell real life stories instead of posting same old press releases and advertising their products. Hustling for attention is hard and doing it for your company’s blog seems even harder but there’s a simple set of tips to be used in case you don’t want to waste time and resources on fruitless blogging. Look around: content is everywhere One of the most frequent excuses for not blogging we hear from tech co’s is “we don’t have anything significant to blog about”. Half of the startups we meet tend to believe that their potential audience is not interested in posts about anything less than graduating from YC. It’s sort of true as you should not really pose yourself as a topSomething About Cats, Dogs, Machine and Deep Learning
Written by Artem Hurshudov
Deep Blue beat Kasparov at chess in 1997. Watson beat the brightest trivia minds at Jeopardy in 2011. Can you tell Fido from Mittens in 2013? The picture and quote are taken from the challenge at Kaggle that took place in autumn last year. Looking ahead, we can fairly enough reply “Yes” to the question. The ten leaders coped with the task by 98.8%, which can not but impress. But where does such question come from? Why have classification tasks been (and still are) beyond programs’ capacity, though a four year old child can cope with them? Why is it more difficult to identify objects of the world than to play chess? What is deep learning and why are cats mentioned so often in related posts? Let’s talk about it. What Does “Detect” Mean? Suppose there are two categories and a great number of pictures to be apportioned toCellular Automata Using Comonads
Written by Curly Brace
I have recently come across an article about implementing a one-dimensional cellular automaton using comonads. But this material is a bit outdated. Therefore, I’ve decided to write an article of my own and consider two-dimensional cellular automata by the example of The Game of Life: Universe Let’s take a look at Universe data type that is defined the following way: data Universe a = Universe [a] a [a] It’s a doubly infinite list focusing on some element that we can shift using the following functions: left, right :: Universe a -> Universe a left (Universe (a:as) x bs) = Universe as a (x:bs) right (Universe as x (b:bs)) = Universe (x:as) b bs It’s basically a zipper , but we can consider it as a constant C-pointer to the infinite memory area as all increment and decrement operations are applicable to it. But how do we dereference it? Let’sProcesses Paralleling to Speed up Computing and Tasks Execution in Linux
Written by XakepRU
Almost all PCs, released during the last few years, have had at least a dual core processor. So reader, if your PC isn’t extremely old or the bottom of the barrel budget brand, then most likely you are the owner of a multiple-processor system. Also if you like to play games, you should know you are utilizing potentially hundreds of GPU cores. But during the lion’s share of time all of these cores just gather dust. Let’s try to fix that. Introduction We rarely involve all the power of several processors (or cores) in order to solve every day problems. The high-end graphic engines are used for computer games only. I don’t like that. If I am working, why should my processors be resting? We should take on board all facilities and beauties of multi processors (multi cores) and parallelize everything possible. We should also use a heavy-duty video cardsLock-free Data Structures. 1 — Introduction
Written by khizmax
I hope that this article will give a good start for a series of notes about lock-free data structures. I would like to share my experience with community, monitoring and thoughts about what lock-free structures are, how to implement them and whether the concepts of Standard Template Library...
Oil Series in R
Written by kxx
“Charts are great for predicting the past.” -Peter Lynch I have not dealt with time series in practice, but I definitely read about them (mostly at school) and had some idea about the way the analysis is carried out. But it is well known that what told in textbooks on statistics and machine learning does not always reflect the real situation. I guess a lot of people follow the pirouettes made by the curve of oil prices . The chart looks either chaotic, or too regular, so making any predictions on it is quite a thankless job. Of course, we can unleash the full power of statistical, economic and mathematical, and expert methods on time series, but let’s try to deal with the technical analysis – of course, on the basis of R. When working with regular time series, we can use a standard approach: Visual analysis Decompose theWhy Most IT Companies Do Not Need Marketing Teams
Written by Dmitry Kabanov
The word for 2015 is hustle . Companies cutting costs and workforce are forced to look for real indie talent in order to outsource marketing and content creation. Startups have no time for anything but core product and they are about to recognise freelancers and niche agencies as well. Efficiency problem Major tech companies have their own marketing teams, startups tend to hire growth hackers and move towards spending most of their time working on core products. Both are still viable ways of doing marketing but there's a couple of moves that can minimize your co's burn rate. Whether it's a small to mid-sized tech company or a startup, this is going to work for you. Marketing teams: forget about efficiency here. Low output, high burn rate, poor content quality and tons of press releases – no need to explain the rest. Reason to this : dev folks, designersBayes’ Theorem, Predictions and Confidence Intervals
Written by HKey
There are plenty of articles on this subject, but they do not review real-life problems. I am going to try to fix this. We use Bayes’ Theorem (a.k.a. Bayes’ law or Bayes’ rule) to filter spam in recommendation services and for ratings system. A great number of algorithms of fuzzy searches would be impossible without it. Besides, the theorem is the cause of holy wars between mathematicians. Introduction Let’s start from the very beginning. If one event occurrence either increases, or decreases the probability of other event occurrence, such events are called dependent. Probability theory does not study cause-and-effect relations. Therefore, dependent events are not necessarily effects of each other, the relation is not always obvious. For example, “ a person has blue eyes ” and “ a person knows Arabic ” are dependent events, as Arabian people rarely have blue eyes. Let’s introduce the following notions: P(A) isComparing Rust and C++
Written by Dzmitry Malyshau
All the examples in the article are not real. So use your imagination to estimate the scope of threat. C++ programs have been compiled with gcc-4.7.2 in C++11 mode, using online compiler . Programs in Rust have been built with Rust 0.11, using the rust play app. I know that there are a lot of changes in C++14 as well as in latest Rust release. But I would still be glad to read your feedback. You’re also welcome to share any information about D. Template Types C++ author has not been happy as for templates implementation in the language. He called them «compile-time duck typing» in one of his Lang-NEXT talks. The thing is that it’s not always clear, what we should use to instantiate a template looking at its declaration. The situation is worsened by monster-like error messages. Let’s try to build the following program: #includeMeet Kukuruku Hub v2.0
Written by Kukuruku Hub
We are happy to announce a new, redesigned version of Kukuruku Hub! First of all, we would like to say «Thank you!» to the whole team, who worked really hard to get this project off the ground. We have redesigned most of the web site and hope the UI/UX is more smooth and sleek now. Please let us know what you think and how we can improve. Really! Your opinion is super important. There is a comments section below the article. Otherwise, simply shoot us an email at [email protected] . In addition to redesign, we rolled out a new Companies feature. As you may or may not know, Kukuruku is based on hubs. A hub is a type of weblog in which posts are written and published by more than one author. Every hub is dedicated to a specific topic. It helps us to keep the information categorized andAre Time Travels Possible?
Written by forgotten
Being a fan of scientism , I am going to tell you about the nature of time, causality and time travels. Time According to classical mechanics, time is absolute and invariable in the sense that when moving from one reference system to another one, time frames do not change: (x, y, z, t) are coordinates in the old frame, while (x', y', z', t') are coordinates in the new one. It is expected that one system moves in-parallel along x axis at v speed. (adsbygoogle = window.adsbygoogle || []).push({}); It’s the so-called Galilean transformation , which is what happens to coordinates when reference systems are changed. In the Galilean sense, there’s just one “time flow” in the Universe and time coordinates are the same for all objects. At that, classical mechanics does not treat the time arrow originality in any way. Moreover, the concept of the flow of timeAVL Trees
Written by Nikolai Ershov
In the previous article we’ve reviewed Randomized Binary Search Trees . Today we are going to review the implementation of AVL Trees . They must be the first type of Balanced Binary Search Trees. They were invented by two Soviet inventors, G. M. Adelson-Velskii and E. M. Landis in 1962. There are plenty of AVL trees implementations, but, to my mind, none of them is good enough when you try to make sense of it all from scratch. They say that AVL trees are simpler than Red-Black trees , but when looking at the code, we can not believe it. Thus, I have decided to explain the structure of AVL trees step by step. I’ll also provide the code in C++. AVL Tree Notion First of all, an AVL Tree is a Binary Search Tree (BST), the keys of which meet standard requirements: a key of any tree nodeHaskell. Testing a Multithread Application
Written by Ankuzik
I guess it’s no secret for anyone that multithread applications writing is connected with many problems you wouldn’t face when developing single-thread programs. One of the problems lies in an application testing. We can’t control the order in which operations are performed. Therefore, we...
or