﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.net/blog/</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Isn't it ironic: Money isn't transactional</title><description>&lt;p&gt;I write a transactional database for a living, and the best example of why we want transactions is transferring money between accounts. It is ironic, therefore, that there is no&amp;nbsp;such thing as transactions for money transfers in the real world.&lt;/p&gt;
&lt;p&gt;If you care to know why, go back 200 years and consider how a bank would operate in an environment without instant communication. I would actually recommend doing that, it is a great case study in distributed system design. For example, did you know that the Templars used cryptography to send money almost a thousand years ago?&lt;/p&gt;
&lt;p&gt;Recently I was reviewing my bank transactions and I found the following surprise. This screenshot is from yesterday (Dec 18), and it looks like a payment that I made is still &amp;ldquo;stuck in the tubes&amp;rdquo; two and a half weeks later.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I got in touch with the supplier in question to apologize for the delay. They didn&amp;rsquo;t understand what I was talking about. Here is what they see when they go to their bank, they got&amp;nbsp;the money.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For fun, look at the number of different dates that you can see in their details.&lt;/p&gt;
&lt;p&gt;Also, as of right now, my bank account still shows the money as pending approval (to be sent out from my&amp;nbsp;bank).&lt;/p&gt;
&lt;p&gt;I might want to recommend that they use a different database. Or maybe I should just convince the bank to approve the payment by the time of the next&amp;nbsp;invoice and see if I can get a bit of that infinite money glitch.&lt;/p&gt;</description><link>http://ayende.net/blog/201828-B/isnt-it-ironic-money-isnt-transactional?Key=ae508d84-fae8-461e-bcb4-a76c2dc557b3</link><guid>http://ayende.net/blog/201828-B/isnt-it-ironic-money-isnt-transactional?Key=ae508d84-fae8-461e-bcb4-a76c2dc557b3</guid><pubDate>Tue, 24 Dec 2024 12:00:00 GMT</pubDate></item><item><title>A call with my wife</title><description>&lt;p style="text-align: left;"&gt;This happened a few minutes ago, I got a call from an unknown number. That was my wife&amp;rsquo;s work number, and she called to ask me an urgent question, it seems:&lt;/p&gt;
&lt;p style="text-align: left;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="text-align: left;"&gt;&amp;ldquo;Can you tell me how to compress a PDF file?&amp;rdquo; she asked.&lt;/p&gt;
&lt;p style="text-align: left;"&gt;For the next part, it might be better if I paint you the whole picture. Imagine bullet time, where everything slows down, and I start to analyze the question and my possible answer. The following thoughts run through my mind during that time.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;PDF files are already compressed by default.&lt;/li&gt;
&lt;li&gt;Pretty sure that the file format is already using compression.&lt;/li&gt;
&lt;li&gt;You &lt;em&gt;could&lt;/em&gt;&amp;nbsp;strip unneeded elements from the file, removing fonts is one example, I think.&lt;/li&gt;
&lt;li&gt;If there are images, can probably downscale or re-sample them to reduce their size.&lt;/li&gt;
&lt;li&gt;What about just running this through Zip?&lt;/li&gt;
&lt;li&gt;Where did &lt;em&gt;this&lt;/em&gt;&amp;nbsp;question come from?&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="text-align: left;"&gt;That took about two seconds in real time. The decision tree for any possible answer here grew exponentially. I had to make a call.&lt;/p&gt;
&lt;p style="text-align: left;"&gt;&amp;ldquo;No, that isn&amp;rsquo;t easily possible,&amp;rdquo; I answered.&lt;/p&gt;
&lt;p style="text-align: left;"&gt;I got some more details as well.&lt;/p&gt;
&lt;p style="text-align: left;"&gt;&amp;ldquo;This is for uploading a document to the XYZ system, it only accepts up to 4MB files, but this PDF is 5.5MB. I guess I can just scan this document as two separate pages instead of one, right?&amp;rdquo;&lt;/p&gt;
&lt;p style="text-align: left;"&gt;A workaround found, and a detailed dive into lossless vs. lossy compression compared to the file format choice avoided, I agreed that this was probably the best option and finished my coffee, pondering the ethical dilemma of answering the &lt;em&gt;actual&lt;/em&gt;&amp;nbsp;question or the &lt;em&gt;intended&lt;/em&gt;&amp;nbsp;question.&lt;/p&gt;</description><link>http://ayende.net/blog/200674-A/a-call-with-my-wife?Key=96e5fd69-c70d-4212-bea9-498f3b28fe79</link><guid>http://ayende.net/blog/200674-A/a-call-with-my-wife?Key=96e5fd69-c70d-4212-bea9-498f3b28fe79</guid><pubDate>Mon, 29 Jan 2024 12:00:00 GMT</pubDate></item><item><title>Tracking down RavenDB I/O usage in Linux</title><description>&lt;p&gt;Today I had to look into the a customer whose RavenDB instance was burning through a lot of I/O. The process is somewhat ingrained in me by this point, but I thought that it would make for a good blog post so I’ll recall that next time.&lt;/p&gt;&lt;p&gt;Here is what this looks like from the point of view of the disk:&lt;/p&gt;&lt;p&gt;&lt;a href="https://ayende.com/blog/Images/Open-Live-Writer/Tracking-down-IO-usage-in-Linux_12BB4/image_2.png"&gt;&lt;img width="982" height="368" title="image" style="margin: 0px; display: inline; background-image: none;" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/Tracking-down-IO-usage-in-Linux_12BB4/image_thumb.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;We are seeing a &lt;em&gt;lot&lt;/em&gt; of reads in terms of MB/sec and a &lt;em&gt;lot&lt;/em&gt; of write operations (but far less in terms of bandwidth). That is the external details, can we figure out more? Of course.&lt;/p&gt;&lt;p&gt;We start our investigation by running:&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;sudo iotop -ao&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;This command gives us the &lt;em&gt;accumulative&lt;/em&gt; time for threads that do I/O. One of the important things that RavenDB is to tag its threads with the tasks that they are assigned. Here is a sample output:&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;  TID  PRIO  USER     DISK READ DISK WRITE&amp;gt;  SWAPIN      IO    COMMAND
 2012 be/4 ravendb    1748.00 K    143.81 M  0.00 %  0.96 % Raven.Server -c /ravendb/config/settings.json [Follower thread]
 9533 be/4 ravendb     189.92 M     86.07 M  0.00 %  0.60 % Raven.Server -c /ravendb/config/settings.json [Indexing of Use]
 1905 be/4 ravendb     162.73 M     72.23 M  0.00 %  0.39 % Raven.Server -c /ravendb/config/settings.json [Indexing of Use]
 1986 be/4 ravendb     154.52 M     71.71 M  0.00 %  0.38 % Raven.Server -c /ravendb/config/settings.json [Indexing of Use]
 9687 be/4 ravendb     185.57 M     70.34 M  0.00 %  0.59 % Raven.Server -c /ravendb/config/settings.json [Indexing of Car]
 1827 be/4 ravendb     172.60 M     65.25 M  0.00 %  0.69 % Raven.Server -c /ravendb/config/settings.json ['Southsand']&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;In this case, we see the top 6 threads in terms of I/O (for writes). We can see that we have a lot of of indexing and documents writes. That said, thread names in Linux are limited to 14 characters, so we probably need to give better names to them.&lt;/p&gt;&lt;p&gt;That is part of the task, let’s look at the cost in terms of &lt;em&gt;reads:&lt;/em&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;  TID  PRIO  USER    DISK READ&amp;gt;  DISK WRITE  SWAPIN      IO    COMMAND
11191 be/4 ravendb       2.09 G     31.75 M  0.00 %  7.58 % Raven.Server -c /ravendb/config/settings.json [.NET ThreadPool]
11494 be/4 ravendb    1353.39 M     14.54 M  0.00 % 19.62 % Raven.Server -c /ravendb/config/settings.json [.NET ThreadPool]
11496 be/4 ravendb    1265.96 M      4.97 M  0.00 % 16.56 % Raven.Server -c /ravendb/config/settings.json [.NET ThreadPool]
11211 be/4 ravendb    1120.19 M     42.66 M  0.00 %  2.83 % Raven.Server -c /ravendb/config/settings.json [.NET ThreadPool]
11371 be/4 ravendb    1114.50 M     35.25 M  0.00 %  5.00 % Raven.Server -c /ravendb/config/settings.json [.NET ThreadPool]
11001 be/4 ravendb    1102.55 M     43.35 M  0.00 %  3.12 % Raven.Server -c /ravendb/config/settings.json [.NET ThreadPool]
11340 be/4 ravendb     825.43 M     26.77 M  0.00 %  4.85 % Raven.Server -c /ravendb/config/settings.json [.NET ThreadPool]&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;That is a lot more complicated, however. Now we don’t know what task this is running, only that &lt;em&gt;something&lt;/em&gt; is reading a lot of data.&lt;/p&gt;&lt;p&gt;We have the thread id, so we can make use of that to see what it is doing:&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;sudo strace -p 11191 -c&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;This command will track the statistics on the systems calls that are issued by the specified thread. I’ll typically let it run for 10 – 30 seconds and then hit Ctrl+C, giving me:&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 90.90    3.868694         681      5681        82 futex
  8.28    0.352247           9     41035           sched_yield
  0.79    0.033589        1292        26           pwrite64
  0.03    0.001246          52        24         1 recvfrom
  0.01    0.000285         285         1           restart_syscall
  0.00    0.000000           0         2           madvise
  0.00    0.000000           0         2           sendmsg
------ ----------- ----------- --------- --------- ----------------
100.00    4.256061                 46771        83 total&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;I’m mostly interested in the &lt;em&gt;pwrite64&lt;/em&gt; system call. RavenDB uses &lt;em&gt;mmap&lt;/em&gt;() for most of its data access, so that is harder to read, but we can get a lot of information from the output. Now I’m going to run the following command:&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;sudo strace -p 11191 -e trace=pwrite64&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;This will give us a trace of all the &lt;em&gt;pwrite64() &lt;/em&gt;system calls from that thread, looking like this:&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;pwrite64(315, "\365\275"..., 4113, 51080761896) = 4113
pwrite64(315, "\344\371"..., 4113, 51080893512) = 4113&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;There is an strace option (-y) that can be used to show the file paths for system calls, but I forgot to use it, no worries, I can do:&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;sudo ls -lh /proc/11191/fd/315&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;Which will give me the details on this file:&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;lrwx------ 1 root root 64 Aug  7 09:21 /proc/11783/fd/315 -&amp;gt; /ravendb/data/Databases/Southsand/PeriodicBackupTemp/2022-08-07-03-30-00.ravendb-encrypted-full-backup.in-progress&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;And that tells me everything that I need to know. The reason we have high I/O is that we are generating a backup file. That explains why we are seeing a lot of reads (since we need to read in order to generate the backup).&lt;/p&gt;&lt;p&gt;The entire process is mostly about figuring out exactly what is going on, and RavenDB is &lt;em&gt;very&lt;/em&gt; careful about leaving as many breadcrumbs as possible to make it easy to follow.&lt;/p&gt;</description><link>http://ayende.net/blog/197985-A/tracking-down-ravendb-i-o-usage-in-linux?Key=41e86bd7-26b0-43c8-a219-a5be9ccdd5d1</link><guid>http://ayende.net/blog/197985-A/tracking-down-ravendb-i-o-usage-in-linux?Key=41e86bd7-26b0-43c8-a219-a5be9ccdd5d1</guid><pubDate>Mon, 08 Aug 2022 12:00:00 GMT</pubDate></item><item><title>Converting PFX format to PEM via OpenSSL programmatically</title><description>&lt;p&gt;I run into a task that I needed to do in Go, given a PFX file, I needed to get a tls.X509KeyPair from that. However, Go doesn’t have support for PFX. RavenDB makes extensive use of PFX in general, so that made things hard for us. I looked into all &lt;em&gt;sorts&lt;/em&gt; of options, but I couldn’t find any way to manage that properly. The nearest find was the &lt;a href="https://pkg.go.dev/golang.org/x/crypto/pkcs12"&gt;pkcs12&lt;/a&gt; package, but that has support for only some DER format, and cannot handle common PFX files. That was a problem.&lt;/p&gt;&lt;p&gt;Luckily, I know how to use OpenSSL, but while there are &lt;em&gt;countless&lt;/em&gt; examples on how to use OpenSSL to convert PFX to PEM and the other way around, all of them assume that you are using that from the command line, which isn’t what we want. It took me a bit of time, but I cobbled together a one off code that does the work. The code has a strange shape, I’m aware, because I wrote it to interface with Go, but it does the job. &lt;/p&gt;&lt;blockquote&gt;&lt;script src="https://gist.github.com/ayende/50a7526d275abdc67d49bd9e157d9e6c.js"&gt;&lt;/script&gt;&lt;/blockquote&gt;&lt;p&gt;Now, from Go, I can run the following:&lt;/p&gt;&lt;blockquote&gt;&lt;script src="https://gist.github.com/ayende/5520dc557bd36b766c5669ee2e2fdaa4.js"&gt;&lt;/script&gt;&lt;/blockquote&gt;&lt;p&gt;As you can see, most of the code is there to manage error handling. But you can now convert a PFX to PEM and then pass that to X509keyPair easily.&lt;/p&gt;&lt;p&gt;That said, this seems just utterly &lt;em&gt;ridiculous&lt;/em&gt; to me. There has &lt;em&gt;got&lt;/em&gt; to be a better way to do that, surely.&lt;/p&gt;</description><link>http://ayende.net/blog/194625-C/converting-pfx-format-to-pem-via-openssl-programmatically?Key=37b4adff-89e1-4cb4-9553-a0fe80544dd3</link><guid>http://ayende.net/blog/194625-C/converting-pfx-format-to-pem-via-openssl-programmatically?Key=37b4adff-89e1-4cb4-9553-a0fe80544dd3</guid><pubDate>Thu, 26 Aug 2021 12:00:00 GMT</pubDate></item><item><title>An instant Do Not Hire decision</title><description>&lt;p&gt;Following a phone screen, we typically ask candidates to complete some coding tasks. The idea is that we want to see their code and asking a candidate to program during an interview… does not go well. I had a candidate some years ago that was provided with a machine, IDE and internet connection and walked out after failing for 30 minutes to reverse a string. Given that his CV said that he has 8 years of experience, I consider myself very lucky.&lt;/p&gt;&lt;p&gt;Back to the candidate that prompt this post. He sent us answers to the coding tasks. In Node.JS and C++. Okay, weird flex, but I can manage. I don’t actually care what language a candidate knows, especially for the junior positions. &lt;/p&gt;&lt;p&gt;Given that we are hiring for junior positions, we’ll usually get solutions that &lt;em&gt;bend&lt;/em&gt; the question restrictions. For example, they would do a linear scan of a file even when they were asked not to. For the most part, we can ignore those details and focus on what the candidate is showing us. Sometimes we ask them to fix a particular issue, but usually we’ll just get them to the interview and ask them about their code there. &lt;/p&gt;&lt;p&gt;I like asking candidates about their code, because I presume that they spent some time thinking about it and can discuss the topic in some detail. At one memorable interview I had a candidate tell me: “I didn’t write this code, I have no idea what is going on here”. I had triple checked that this is indeed the code they sent and followed up by sending the candidate home, sans offer. We can usually talk with the candidate about what drove them to certain decisions, what impact a particular constraint would be on their code, etc.&lt;/p&gt;&lt;p&gt;In this case, however, the code was bad enough that I called it. I sent the candidate a notification about the issues we found in their code, detailing the 20+ critical failures that we found in the space of a few minutes of looking at it. &lt;/p&gt;&lt;p&gt;The breaking point for me was that the tasks &lt;em&gt;did not actually work&lt;/em&gt;. In fact, they &lt;em&gt;couldn’t&lt;/em&gt; work. I’m not sure if they compiled, I didn’t check, but they certain were never even eyeballed.&lt;/p&gt;&lt;p&gt;For example, we asked the candidate to build a server that would translate messages to Morse code and cause the server speaker to beep in Morse code. Nothing particularly fancy, I think. But we got a particular implementation for that. For example, here is the relevant code that plays the Morse code:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="https://ayende.com/blog/Images/Open-Live-Writer/An-instant-Do-Not-Hire-decision_9894/image_2.png"&gt;&lt;img width="231" height="102" title="image" style="margin: 0px; border: 0px currentcolor; border-image: none; display: inline; background-image: none;" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/An-instant-Do-Not-Hire-decision_9894/image_thumb.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;The Node.js version that I’m using doesn’t come with the relevant machine learning model to make that actually happen, I’m afraid. &lt;/p&gt;&lt;p&gt;The real killer for me was this part:&lt;/p&gt;&lt;blockquote&gt;&lt;script src="https://gist.github.com/ayende/7d42d6554dbc0b213d8af6726e8d4b32.js"&gt;&lt;/script&gt;&lt;/blockquote&gt;&lt;p&gt;You might want to read this code a few times. &lt;/p&gt;&lt;p&gt;They pass a variable to a function, set it to a new value and expect to see that new value outside. Basically, they wanted to use an out parameter here, which isn’t valid in JavaScript. &lt;/p&gt;&lt;p&gt;That is the kind of fairly fundamental issue in understanding the flow of code in a program. And that is something that &lt;em&gt;would never have &lt;/em&gt;worked. &lt;/p&gt;&lt;p&gt;I’m okay with getting sub optimal solutions, I’m not fine with it never have been actually looked at. &lt;/p&gt;</description><link>http://ayende.net/blog/193345-B/an-instant-do-not-hire-decision?Key=d2a72209-18c2-4a85-8c0f-b4ce9ea35ac6</link><guid>http://ayende.net/blog/193345-B/an-instant-do-not-hire-decision?Key=d2a72209-18c2-4a85-8c0f-b4ce9ea35ac6</guid><pubDate>Thu, 04 Mar 2021 12:00:00 GMT</pubDate></item><item><title>Spending political capital</title><description>&lt;p&gt;As I’m writing this, there seem to be a huge amount of furor over the US elections. I don’t want to get into &lt;em&gt;that&lt;/em&gt; particular mess, but I had a few idle thoughts about how to fix one of the root issues here. The fact that the system of voting we use is based on pen &amp;amp; paper and was designed when a computer was a job title for a practical mathematician. &lt;/p&gt;&lt;p&gt;A large part of the problem is that we have to wait for a particular date, and there are polls, which seems to be used for information and misinformation at the same time. This means that people are basically trying to vote with insufficient information. It would be much more straightforward if the whole system was transparent and iterative. &lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Note: This is a blog post I’m writing to get this idea out of my head. I did very little research and I’m aware that there is probably a &lt;em&gt;wide&lt;/em&gt; body of proposals in the area, which I didn’t look at.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;The typical manner I have seen suggested for solving the &lt;a href="https://en.wikipedia.org/wiki/End-to-end_auditable_voting_systems"&gt;election problem&lt;/a&gt; is to ensure the following properties:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Verifying that my vote was counted properly.&lt;/li&gt;&lt;li&gt;Verifying that the total votes were counted fairly.&lt;/li&gt;&lt;li&gt;(maybe) Making it hard / impossible to show a 3rd party who I voted to.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The last one is obviously pretty hard to do, but is important to prevent issues with pressuring people to vote for particular candidates.&lt;/p&gt;&lt;p&gt;I don’t have the cryptographic chops to come up with such a system, not do I think that it would be particularly advisable. I would rather come up with a different approach entirely. In my eyes, we can have a system where we have the following:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;The government issues each voter with a token (coin) that they can spend. That will probably get you to think about blockchains, but I don’t think this is a good idea. If we are talking about technical details, let’s say that the government issues a certificate to each voter (who generates their own private key, obviously).&lt;/li&gt;&lt;li&gt;The voter can then give that voting coin to a 3rd party. For example, but signing a vote for a particular candidate using their certificate. &lt;/li&gt;&lt;li&gt;These coins can then be “spent” during election. The winner of the election is the candidate that got more than 50% of the total coins spent. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;As it currently stands, this is a pretty horrible system. To start with, this means that it is &lt;em&gt;painfully&lt;/em&gt; obvious who voted for whom. I think that a transparent voting record might be a good idea in general, but there are multitude of problems with that. So like many great ideas in theory, we shouldn’t allow it. &lt;/p&gt;&lt;p&gt;This is usually where [complex cryptography] comes into play, but I think that a much better option would be to introduce the notion of brokers into the mix. What do I mean?&lt;/p&gt;&lt;p&gt;While you could spend your coin directly on a particular candidate, you could also spend it at a broker. That broker is then delegated to use your vote. You may use a party affiliated broker or a neutral one. Imagine a 2 party system when you have the Olive party and the Opal party. I’m using obscure colors here to try to reduce any &lt;em&gt;meaning&lt;/em&gt; people will read into the color choices. For what it’s worth, red &amp;amp; blue as party colors have opposite meaning in the states and Israel, which is &lt;em&gt;confusing&lt;/em&gt;.&lt;/p&gt;&lt;p&gt;Let’s take two scenarios into considerations:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;A voter spend their coin on the Olive Political Action Committee, who is known to support Olive candidates. In this case, you can clearly track who they want to vote for. Note that they aren’t voting directly for a candidate, because they want to delegate their vote to a trusted party to manage that.&lt;/li&gt;&lt;li&gt;A voter spend their coin on a Private Broker #435. While they do that, they instruct the broker to pass their vote to the Olive PAC broker, or a particular candidate, etc. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The idea is that the private broker is taking votes from enough people that while it is possible to know that you went through a particular broker, you can’t know who you voted for. The broker itself obviously know, but that is similar to tracking the behavior of a voting booth, &lt;a href="https://arxiv.org/abs/1608.08020"&gt;which also allows you to discover who voted to whom&lt;/a&gt;. I think that it is possible to set things up so the broker itself won’t be able to make this association, however. Secured Sum would work, probably. A key point for me is that this is an issue that is internal to a particular broker, not relevant to the system as a whole.&lt;/p&gt;&lt;p&gt;So far, I don’t think that I’m doing too much, but the idea here is that I want to take things further. Instead of stopping the system there, we allow &lt;em&gt;to change the vote&lt;/em&gt;. In other words, instead of having to vote blindly, we can look at the results and adjust them. &lt;/p&gt;&lt;p&gt;In the Apr 2019 Israeli election, over 330 &lt;em&gt;thousands&lt;/em&gt; votes were discarded because they didn’t reach the minimum threshold. That was mostly because the polls were wrong, because I don’t think that people would have voted for those parties if they knew that they are on the verge. Being able to look at that and then adjust the votes would allow all those votes to be counted. &lt;/p&gt;&lt;p&gt;Taking this further, once we have the system of brokers and electronic votes in place, there is no reason to do an election once every N years. Instead, we can say that the coins are &lt;em&gt;literal&lt;/em&gt; political capital. In order to remain in office, the elected officials must &lt;em&gt;keep&lt;/em&gt; holding over 50% of the amount of spent coins. It would probably be advisable to actually count these on a weekly / bi-weekly basis, but doing this on a short time intervals means that there is going to be a lot more accountability. &lt;/p&gt;&lt;p&gt;Speaking from Israel’s point of view, there have been sadly &lt;em&gt;numerous&lt;/em&gt; cases where candidates campaigned on A, then did the exact opposite once elected. There is even a couple of famous sayings about it:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;We promised, but didn’t promise to fulfil.&lt;/li&gt;&lt;li&gt;What you see from here you can’t see from there.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Note that this is likely to result in more populist system, since the elected officials are going to &lt;em&gt;pay attention &lt;/em&gt;to the electorate on an ongoing basis, rather than just around election time. I can think of a few ways to handle that. For example, once seated, for a period of time, you’ll need &amp;gt; 50% of the coins to get an elected official out of office.&lt;/p&gt;&lt;p&gt;A few more details:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;For places like the states, where you vote for multiple things at the same time (local, state, federal house &amp;amp; senate, president), you’ll get multiple coins to spend, and can freely spend them in different locations. Or, via a broker, designate that they are to be spend on particular directions.&lt;/li&gt;&lt;li&gt;A large part of the idea is that a voter can withdraw their coin from a broker or candidate at any time.&lt;/li&gt;&lt;li&gt;Losing the key isn’t a big deal. You go to the government, revoke your pervious certificate and get a new one. The final computation will simply ignore any revoked coins.&lt;/li&gt;&lt;li&gt;The previous point is also important to dealing with people who died or moved. It is trivial to ensure that the dead don’t vote in this scheme, and you can verify that a single person don’t have coins from multiple different locations.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The implications of such a system are interesting, in my eyes. The idea is that you delegate the vote to someone you trust, directly or indirectly. That can be a candidate, but most likely will be a group. The usual term in the states in PAC, I believe. The point is that you then have &lt;em&gt;active oversight &lt;/em&gt;by the electorate on the elected officials. &lt;/p&gt;&lt;p&gt;Over seven years ago I wrote &lt;a href="https://ayende.com/blog/160769/elections"&gt;a post about what I most dislike&lt;/a&gt; in the current election system. You are forced to vote on your top issue, but you usually have a far more complex system of values that you have to balance. For example, let’s say that my priorities are:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;National security&lt;/li&gt;&lt;li&gt;Fiscal policy&lt;/li&gt;&lt;li&gt;Healthcare&lt;/li&gt;&lt;li&gt;Access to violet flowers&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I may have to balance between a candidate that want to ban violet flowers but propose to lower taxes or a candidate that wants to raise taxes and want to legalize violet flowers. Which one do I choice? If I can shift my vote as needed, I can make that determination at the right political time. During the budget month, my votes goes to $PreferredFiscalPolicy candidate and then if they don’t follow my preferences on violet flowers, I can shift. &lt;/p&gt;&lt;p&gt;This will have the benefit of killing the polls industry, since you can just &lt;em&gt;look&lt;/em&gt; at where the political capital is. And it will allow the electorate to have a far greater control over the government. I assume that elected officials will then be paying very careful attention to how much political capital they have to spend and act accordingly. &lt;/p&gt;&lt;p&gt;I wonder if I should file this post under science fiction, because that might make a good background for world building. What do you think of this system? And what do you think the effects of it would be?&lt;/p&gt;</description><link>http://ayende.net/blog/192289-A/spending-political-capital?Key=d28b140d-c09a-4e14-877f-86a615f207c7</link><guid>http://ayende.net/blog/192289-A/spending-political-capital?Key=d28b140d-c09a-4e14-877f-86a615f207c7</guid><pubDate>Fri, 06 Nov 2020 08:09:00 GMT</pubDate></item><item><title>Company.Location = new OfficeSpace(); // 4th time the charm</title><description>&lt;p&gt;Exactly 9 years ago, Hibernating Rhinos had a major breakthrough. We moved to our own offices for the first time. Before that, I was mostly working from a home office of clients’ locations.&amp;nbsp; Well, I say &lt;em&gt;we&lt;/em&gt;, but I mean &lt;em&gt;I&lt;/em&gt;. At the time, the change mostly involved me having to put on some shoes and going out of the house to work alone in a big empty office. The rest of the team at the time was completely remote. &lt;/p&gt;&lt;p&gt;I got the office because I needed to. Some people can manage a proper life / work balance while working from home. I find it very hard. I’m the kind of person that would get up at 2 AM to get something to drink, see a new mail notification on the monitor, and start working until 8 AM. Having a separate office was hugely beneficial for me.&amp;nbsp; The other reason was that it allowed me to hire more people locally. The first real employee I had was hired within three months of moving to the new office.&lt;/p&gt;&lt;p&gt;That first office was great, but small. Just 5 rooms about about 120 m² (1300 ft²). We stayed in the office until we got to about 12 people. At this point, we really didn’t have enough room to swing a cat (to be fair, we didn’t &lt;em&gt;have&lt;/em&gt; an office cat, nor a real good reason to want to swing one). We moved offices in 2015, from the center of the industrial zone of the city to the periphery of the business zone). The new offices were 250 m² (2700 ft²) and gave us a lot of room to expand, it also had two major advantages. It was nice to be able to walk downstairs and be able to walk to pretty much anywhere we needed to and we no longer had to deal with having a garage next door. &lt;/p&gt;&lt;p&gt;When we moved to the 2nd office, it felt like we had a &lt;em&gt;huge&lt;/em&gt; amount of room, but it filled up quite quickly. It was certain that we would outgrow the new place in a short order, so we started looking for a permeant home that would suffice for the next 10 years or so. We got one, smack down in the center of the business zone of the city. Next door to city hall, actually. Well, I say “got one”. What we actually got was a piece of paper and a hole in the ground. Before we could move into the new offices, they had to be built first. &lt;/p&gt;&lt;p&gt;We stayed in the second office space for 3 years, but we run out of room before the new offices were ready. So we moved for the third time. Because our new offices weren’t ready, we moved to a shared working space (like WeWork). We planned on being there for a short while, but it ended up for over a year. The plus side, we were able to expand much more easily. We hired quite a few people this year and was able to simple add more offices as we grew. The down side was that this is very much not &lt;em&gt;our&lt;/em&gt; office, so we really want to move.&lt;/p&gt;&lt;p&gt;&lt;em&gt;This week&lt;/em&gt;, however, we are going to finally move. The new offices have more than enough space&amp;nbsp; 415 m² (4500 ft²) for the new five to ten years of growth, it covers two floors in a brand new location, centrally located and &lt;em&gt;beautifully&lt;/em&gt; done. I’m not posting any pictures because the vast majority of our own team haven’t seen it yet (we have a unveiling party tomorrow), but I’m &lt;em&gt;super&lt;/em&gt; happy that we got to this point and just had to share in the blog.&lt;/p&gt;</description><link>http://ayende.net/blog/189441-C/company-location-new-officespace-4th-time-the-charm?Key=599cce2b-2635-4541-9f7e-81ab598c2811</link><guid>http://ayende.net/blog/189441-C/company-location-new-officespace-4th-time-the-charm?Key=599cce2b-2635-4541-9f7e-81ab598c2811</guid><pubDate>Mon, 23 Dec 2019 12:00:00 GMT</pubDate></item><item><title>The big red sales button</title><description>&lt;p&gt;&lt;a href="https://ayende.com/blog/Images/Open-Live-Writer/The-big-red-sales-button_848C/image_2.png"&gt;&lt;img width="316" height="246" title="image" align="right" style="border: 0px currentcolor; border-image: none; float: right; display: inline; background-image: none;" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/The-big-red-sales-button_848C/image_thumb.png" border="0"&gt;&lt;/a&gt;I used the term “Big Red Sales Button” in a previous post, and got a question about it. You can see an illustration of that on the right.&lt;/p&gt;&lt;p&gt;The Big Red Sales Button (BRSB from now on) is a metaphor used to discuss how sales can impact an organization. It is common for the sales team to run into new customer requirements. Some of them are presented as absolute requirements (they usually aren’t).&lt;/p&gt;&lt;p&gt;I have found that the typical response of the sales person at this point is to reply “of course we can do that”, go back to the office and hit the BRSB and notify the dev team that they have &lt;em&gt;$tooShortTimeFrame&lt;/em&gt; to implement said feature.&lt;/p&gt;&lt;p&gt;In one very memorable case, I remember going over contract details and trying to figure out what we need to do there. Right there, in a minimum seven figures contract, there was a clause that explained what the core functionality of the system and the set of features that were required for it to be accepted.&lt;/p&gt;&lt;p&gt;Most of it was pretty normal business application, nothing too strange. But section 5.1.3.c was interesting. In it, in dense legalese, there was a requirement to solve the traveling salesman problem. To be fair, it wasn’t actually &lt;em&gt;that &lt;/em&gt;problem, it was a &lt;a href="https://math.stackexchange.com/questions/2285015/show-basic-scheduling-problem-is-np-complete"&gt;scheduling problem&lt;/a&gt; and I used the traveling salesman as the name for it because it is easier than trying to explain NP complete issues to layman.&lt;/p&gt;&lt;p&gt;I’ll spoil the ending of this post and reveal that I did not solve an NP complete problem. I cheated like hell and actually solved the issue they had (if you limit the solution space, you drastically simplify the cost of a solution). &lt;/p&gt;&lt;p&gt;Sometimes, the BRSB is used for a good purpose. If you have something that can help close a major sale, and it isn’t outrageous to implement it, for example. But in many cases, it is open for abuse. &lt;/p&gt;</description><link>http://ayende.net/blog/188193-A/the-big-red-sales-button?Key=2a2661c8-24f5-468d-ad79-46ef39415391</link><guid>http://ayende.net/blog/188193-A/the-big-red-sales-button?Key=2a2661c8-24f5-468d-ad79-46ef39415391</guid><pubDate>Thu, 08 Aug 2019 12:00:00 GMT</pubDate></item><item><title>Technical marketing from the other side</title><description>&lt;p&gt;I spent the last couple of days in the &lt;a href="https://conferences.oreilly.com/software-architecture/sa-ny"&gt;O’Reilly Architecture Conference&lt;/a&gt; and &lt;a href="https://www.himssconference.org"&gt;HIMSS&lt;/a&gt; (Healthcare Information and Management Systems Society) Conference. During that time, I had the chance of listening to quite a few technical marketing spiels.&lt;/p&gt;&lt;p&gt;Some of them were technically &lt;em&gt;very &lt;/em&gt;impressive, but missed the target by a planet or two. I came up with a really nice analogy for how such presentations do a great disservice for their purpose.&lt;/p&gt;&lt;p&gt;Consider the following:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;This non-steroidal drug has been clinically tested and FDA approved will cease the production of prostaglandins and has a significant antiplatelet effect. It’s available in tablet and syrup forms and is suitable for IVs. May cause diarrhea and/or vomiting. &lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;This is factual (at least as much as I could make it), I assume that if you are a medical professional you might be able to work out possible uses for this drug. But the most important thing that is missing from this description? &lt;em&gt;What does this do?&lt;/em&gt;&lt;/p&gt;&lt;p&gt;This is Ibuprofen and you take it to ease your headache (among many other uses). It can also protect help you avoid blood clots. &lt;/p&gt;&lt;p&gt;I intentionally chose this example, because it is a very obvious one (and I just came back hearing way too much medical stuff). You &lt;em&gt;begin&lt;/em&gt; by telling me how this will ease the pain. In many ways, I consider technical marketing to be composed of the following steps:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Whatever this product can actually ease the pain.&lt;/li&gt;&lt;li&gt;Whatever this customer actually experience the pain.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;For example, if you are promising to have a faster than light bullet-train to Mars,&amp;nbsp; that is going to cast some… doubt on your claims. On the other hand, it doesn’t matter to me if you can cut down my commute time in half if I can get to work while not leaving my house. &lt;/p&gt;&lt;p&gt;If the customer experienced the pain and believe that you can actually help there, you are most of the way there. All that is left is just negotiating, barrier removal, etc.&lt;/p&gt;</description><link>http://ayende.net/blog/186305-C/technical-marketing-from-the-other-side?Key=24fcddf6-e093-445f-bcb1-e802d208bda9</link><guid>http://ayende.net/blog/186305-C/technical-marketing-from-the-other-side?Key=24fcddf6-e093-445f-bcb1-e802d208bda9</guid><pubDate>Wed, 20 Feb 2019 10:00:00 GMT</pubDate></item><item><title>Abusing system flexibility to avoid paying collect tolls</title><description>&lt;p&gt;&lt;a href="https://ayende.com/blog/Images/Open-Live-Writer/Abusing-system-flexibility-to-avoid-payi_140E5/image_2.png"&gt;&lt;img width="208" height="350" title="image" align="right" style="border: 0px currentcolor; border-image: none; float: right; display: inline; background-image: none;" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/Abusing-system-flexibility-to-avoid-payi_140E5/image_thumb.png" border="0"&gt;&lt;/a&gt;I’m going to feel like an old man for this post, but if you were born post 1995, it is likely that you have no idea what I’m talking about in this post, crazy as this sounds to me. &lt;/p&gt;&lt;p&gt;Before there was a phone in every pocket, there were land lines. It is like today’s phone, but much larger, you could only do voice calls and if you wanted to screen your calls you needed to buy another appliance. If you’ll watch the first few sessions of Friends, you’ll see how important a detail that can be. If you were out of the house or office and needed to place a call, you could use something called a public phone booth or a pay phone. &lt;/p&gt;&lt;p&gt;Sadly, the easiest way I can convey what this was is to invoke the Tardis. A small booth in which you had a public access phone. Because phone calls used to cost a &lt;em&gt;lot&lt;/em&gt;, these phone had a way to drop some coins or tokens into the phone to pay for the phone call. &lt;/p&gt;&lt;p&gt;As a child, I didn’t have a wallet and still needed to occasionally make calls. Being stuck without cash at hand wasn’t such a strange thing so there was another way to perform the call. You could reverse the charge, instead of the person &lt;em&gt;placing&lt;/em&gt; the call paying for it, you could call collect. In that case, the person &lt;em&gt;answering&lt;/em&gt; the call would be paying for it. Naturally, since money is involved, you need the other party to accept the charge before actually charging them.&lt;/p&gt;&lt;p&gt;At some point in time, you called a special number and told the operator what number you wanted to do a collect call. The operator would ring this number and ask for permission to connect the call and charge the receiver. I think that the rate for a collect call was significantly higher than the normal call, so you wouldn’t normally do that.&lt;/p&gt;&lt;p&gt;As part of the system automation, the phone company replaced the manual operator collect call with an automated system. You would record a short message, which would be played to the other party. If they wanted to accept the call (and the charge), the could press 1 on the phone, or disconnect to avoid the charge.&lt;/p&gt;&lt;p&gt;As a kid, I quickly learned that instead of telling the other party who is calling and why (so they would accept the call), I could just tell them what &lt;em&gt;my&lt;/em&gt; phone number is. In this way, they would write down the number, refuse the call and then call me back. That would avoid the collect toll charge.&lt;/p&gt;&lt;p&gt;I remember that at some point the phone company made the length of the collect hello message really short, but I got around that by speaking &lt;em&gt;really&lt;/em&gt; fast (or sometimes by making two &lt;em&gt;separate &lt;/em&gt;calls). I remember having to practice saying the phone number a few times to get it done in the right time. &lt;/p&gt;</description><link>http://ayende.net/blog/184739-C/abusing-system-flexibility-to-avoid-paying-collect-tolls?Key=20f721a1-7b2a-4c91-a229-54fb0f5efaaa</link><guid>http://ayende.net/blog/184739-C/abusing-system-flexibility-to-avoid-paying-collect-tolls?Key=20f721a1-7b2a-4c91-a229-54fb0f5efaaa</guid><pubDate>Thu, 11 Oct 2018 09:00:00 GMT</pubDate></item><item><title>This code has expectations from the reader</title><description>&lt;p&gt;I just had a discussion with a colleague about a fix of non trivial code. The question was what comments should go into the code to explain what was going on.&amp;nbsp; If you care to know, this related to the prefetching strategy that is used by RavenDB to reduce the amount of I/O that is required (especially on slow disks). The details don’t actually matter. The problem is that there are multiple relatively complex issues there, from managing I/O to thread safety in the critical code path (using dirty reads intentionally), etc.&lt;/p&gt;&lt;p&gt;The problem with doing this is that the code is &lt;em&gt;complex &lt;/em&gt;but it is a fairly straightforward progress from the kind of code we usually write in performance sensitive sections. The fear was by over commenting the code, we’ll get ourselves into a situation where we’ll be making the code too malleable to change. This is the kind of code that sits in the perf critical section, you change it after fasting for a day or two (with strong encouragement on meditation about little vs. big endian and why half endian is so rare). &lt;/p&gt;&lt;p&gt;In other words, in practice. You change it when you have reason, and you back up that change with a battery of performance tests. Anything from the usual benchmarks to running production loads on various machines to poring over system traces. &lt;/p&gt;&lt;p&gt;Given the amount of effort that is expected from any changes to this code, I consider it to be a good idea for people who read it to understand that there is a hurdle there that must be jumped before it should be modified. Thus, we decided to skip some of the comments on the reasoning behind the overall design. Here is the most &lt;a href="https://github.com/ravendb/ravendb/blob/d408e1211246df52cb17c43bb0198fca4e7cfa70/src/Voron/Impl/Paging/AbstractPager.cs#L467-L471"&gt;important comment in this code&lt;/a&gt;, this is there to explain a particular choice of value and the reasoning that must be applied when it is changed.&lt;/p&gt;&lt;p&gt;What about the whole complexity of the prefetching in general? That isn’t document in code, because reading code comments scattered throughout will make it very hard to grok. This is detailed in the architecture guide that go over these details.&lt;/p&gt;&lt;p&gt;For myself, I find it really awesome to go over a codebase and figure out what reasoning lie behind the code. But when I have people working on my projects? It is better to give them a hand than a riddle.&lt;/p&gt;</description><link>http://ayende.net/blog/184673-C/this-code-has-expectations-from-the-reader?Key=8662434f-26cc-4014-bd81-f45182fce52c</link><guid>http://ayende.net/blog/184673-C/this-code-has-expectations-from-the-reader?Key=8662434f-26cc-4014-bd81-f45182fce52c</guid><pubDate>Thu, 04 Oct 2018 09:00:00 GMT</pubDate></item><item><title>The candidate’s portfolio</title><description>&lt;p&gt;This is a screen shot from a CV I just read:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="https://ayende.com/blog/Images/Open-Live-Writer/The-candidates-portfolio_80FD/image_2.png"&gt;&lt;img width="379" height="111" title="image" style="border: 0px currentcolor; border-image: none; display: inline; background-image: none;" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/The-candidates-portfolio_80FD/image_thumb.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;The CV itself is kind of boring. Just graduated, did so and so course and was excellent in foo and bar. &lt;/p&gt;&lt;p&gt;We see dozens of CVs like that on a regular basis. But the portfolio link was very nice. It linked to a Google Drive folder with a bunch of games that the candidate made, in various languages.&lt;/p&gt;&lt;p&gt;I didn’t actually went and read all the code, but I really skimmed through a bunch of projects there. I actually like the portfolio a lot better than a github link. A portfolio is explicitly about showing a potential employer what you can do. A github link can be used for many things.&lt;/p&gt;</description><link>http://ayende.net/blog/184035-C/the-candidates-portfolio?Key=f0532bb4-5862-4465-85d2-796414e4411a</link><guid>http://ayende.net/blog/184035-C/the-candidates-portfolio?Key=f0532bb4-5862-4465-85d2-796414e4411a</guid><pubDate>Wed, 15 Aug 2018 09:00:00 GMT</pubDate></item><item><title>Looking at a candidate’s GitHub profile</title><description>&lt;p&gt;When a candidate sends a CV and includes a GitHub profiler, that almost always guarantees that I’ll give that profile a look. The most interesting thing from my perspective in a GitHub profile is that it allows me to look at the candidate’s work. There aren’t that many candidates with GitHub profile links, and &lt;em&gt;not&lt;/em&gt; having a link isn’t something that will cause me to rule out a candidate. But I thought it would be interesting to share some of my finding from such trawling of repositories.&lt;/p&gt;&lt;p&gt;Here is an example of something that I don’t like:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="https://ayende.com/blog/Images/Open-Live-Writer/Looking-at-a-candidates-GitHub-profile_AB64/image_2.png"&gt;&lt;img width="954" height="117" title="image" style="border: 0px currentcolor; border-image: none; display: inline; background-image: none;" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/Looking-at-a-candidates-GitHub-profile_AB64/image_thumb.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;In fact, in most code bases, I’ll skim very quickly to find the data access code. SQL Injection is a pet peeve of mine, and seeing how a candidate’s code handle user’s input is an easy way to get a first impression. It isn’t always indicative of “this person has no skills and is careless”, mind. But I found that it is a good place to start. Especially because mostly I’ll see sample projects and half finished stuff. So seeing how they treat this particular issue (which is easily found and should be familiar to most developers) is a good quick check. Then again, here is the same candidate, with another repository:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="https://ayende.com/blog/Images/Open-Live-Writer/Looking-at-a-candidates-GitHub-profile_AB64/image_4.png"&gt;&lt;img width="972" height="102" title="image" style="border: 0px currentcolor; border-image: none; display: inline; background-image: none;" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/Looking-at-a-candidates-GitHub-profile_AB64/image_thumb_1.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;This is using Hibernate, by the way. And that kind of hurt my feelings, to be fair. &lt;/p&gt;&lt;p&gt;On the other hand, a different candidate:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a href="https://ayende.com/blog/Images/Open-Live-Writer/Looking-at-a-candidates-GitHub-profile_AB64/image_6.png"&gt;&lt;img width="922" height="142" title="image" style="border: 0px currentcolor; border-image: none; display: inline; background-image: none;" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/Looking-at-a-candidates-GitHub-profile_AB64/image_thumb_2.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;That is a much better, and show that they pay attention to other functional requirements. &lt;/p&gt;&lt;p&gt;In general, I consider the presence of a GItHub link in a CV as an invitation to evaluate the candidate’s work and will do so with the goal of understanding their approach, the quality of their code and their skills. As such, if you include a GitHub link in a CV, I would recommend consider this to be your public face and a criterion for evaluation.&lt;/p&gt;&lt;p&gt;This &lt;em&gt;is&lt;/em&gt; an advantage. It means that the GitHub link mere existence make you pop out of the crowd. On the other hand, it also means that your code is under scrutiny.&lt;/p&gt;&lt;p&gt;I’m advising here for people starting out, without much background. As such, having a straightforward way to be evaluated on your skills is a plus. I would suggest making it easier. For example, a clear README is nice, especially if you explain what you were trying to do. “Playing around with Angular to see how it feels” is a great thing to have, because it gives context to the person reading your code. Especially for web applications and client side work, having a visible demo that I can quickly look at is great. &lt;/p&gt;&lt;p&gt;On the other hand, having well known bad practices (such as SQL Injection, plain text passwords, etc) in the code is a big negative.&lt;/p&gt;</description><link>http://ayende.net/blog/184002-C/looking-at-a-candidates-github-profile?Key=09e0cf25-ddea-4eec-bd1c-7805eec9f667</link><guid>http://ayende.net/blog/184002-C/looking-at-a-candidates-github-profile?Key=09e0cf25-ddea-4eec-bd1c-7805eec9f667</guid><pubDate>Tue, 31 Jul 2018 09:00:00 GMT</pubDate></item><item><title>The GitHub profile you don’t want in your CV</title><description>&lt;p&gt;I just got a CV from a candidate looking for a junior position. I looked at the CV (and oh my God, did this guy have a &lt;em&gt;lot&lt;/em&gt; of acronyms in there). I noted that he has a GitHub account in the CV, so naturally I checked it.&lt;/p&gt;&lt;p&gt;There is a single repository there, which I’ll present to you in all its glory:&lt;/p&gt;&lt;p&gt;&lt;a href="https://ayende.com/blog/Images/Open-Live-Writer/The-GitHub-profile-you-dont-want-in-your_A901/image_2.png"&gt;&lt;img width="1110" height="407" title="image" style="margin: 0px; border: 0px currentcolor; border-image: none; display: inline; background-image: none;" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/The-GitHub-profile-you-dont-want-in-your_A901/image_thumb.png" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;This is actually a &lt;em&gt;negative&lt;/em&gt;. If he didn’t have a GitHub account, I wouldn’t have minded. But including one that is in this shape is not a good idea.&lt;/p&gt;</description><link>http://ayende.net/blog/184001-C/the-github-profile-you-dont-want-in-your-cv?Key=2b7032ff-c081-48da-a68f-943db0c9ce67</link><guid>http://ayende.net/blog/184001-C/the-github-profile-you-dont-want-in-your-cv?Key=2b7032ff-c081-48da-a68f-943db0c9ce67</guid><pubDate>Mon, 30 Jul 2018 09:00:00 GMT</pubDate></item><item><title>Toddlers, cursing and preparing ahead of time</title><description>&lt;p&gt;&lt;a href="https://ayende.com/blog/Images/Open-Live-Writer/Toddlers-cursing-and-preparing-ahead-of-_9F78/image_2.png"&gt;&lt;img width="233" height="155" title="image" align="right" style="border: 0px currentcolor; border-image: none; float: right; display: inline; background-image: none;" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/Toddlers-cursing-and-preparing-ahead-of-_9F78/image_thumb.png" border="0"&gt;&lt;/a&gt;My daughter is 3​¼ years old now. About the time that she was born, I decided that I needed to make a small change in my language. Whenever I felt the urge to curse, I would say a food’s name. For example, after being puked on, my reaction would be some variant of: “PASTA”, “PASTA BOLOGNESE” or other pasta’s favorites.&lt;/p&gt;&lt;p&gt;As time went by, I got better and better at expressing emotion through increasingly disturbing food references. My current favorite is: “Pasta Bolognese with pickled carrots in a bun with anchovies and raw eggs”.&lt;/p&gt;&lt;p&gt;A couple of days ago, I took my daughter and a friend to an ice cream shop. As expected of an ice cream shop in the middle of (very hot) summer, the place was packed. My daughter was quite excited to go there and expressed her emotions by standing up and shouting at the top of her lungs (she is three, with a voice that carry like a foghorn): “PASTA! PASTA BOLOGNESE” over and over again. &lt;/p&gt;&lt;p&gt;This is a crowded shop, full of small kids and parents. I got some looks for the little girl holding up a full ice cream cone and shouting about pasta, but it was infinitely preferable to the alternative. &lt;/p&gt;&lt;p&gt;An unforeseen side effect, however, is that because I can, I’m very free with pasta based profanities. This had led to what is effectively a competition, with her trying to cause me to go overboard with that. &lt;/p&gt;&lt;p&gt;And now I must go back to work, before the gluten police arrival.&lt;/p&gt;</description><link>http://ayende.net/blog/183713-C/toddlers-cursing-and-preparing-ahead-of-time?Key=cd6ae6db-6276-4fca-87d9-3ca7759d2675</link><guid>http://ayende.net/blog/183713-C/toddlers-cursing-and-preparing-ahead-of-time?Key=cd6ae6db-6276-4fca-87d9-3ca7759d2675</guid><pubDate>Tue, 10 Jul 2018 09:00:00 GMT</pubDate></item><item><title>The Incredibles II</title><description>&lt;p&gt;&lt;a href="https://ayende.com/blog/Images/Open-Live-Writer/4ae5e24bc3d5_B67/image_2.png"&gt;&lt;img width="173" height="260" title="image" align="right" style="border: 0px currentcolor; border-image: none; float: right; display: inline; background-image: none;" alt="image" src="https://ayende.com/blog/Images/Open-Live-Writer/4ae5e24bc3d5_B67/image_thumb.png" border="0"&gt;&lt;/a&gt;I just got back from watching the Incredibles 2. The previous movie was a favorite a mine from first view, and it is one of the few movies that I can actually bear to watch multiple times. I was hoping for a sequel almost from the moment I finished the first movie, and it took over a decade to get it.&lt;/p&gt;&lt;p&gt;I actually sat down with my 3 years old daughter to watch the first movie before I went to see the second one. I’m not sure of how much she got from it, although she is &lt;em&gt;very&lt;/em&gt; fond of trains and really loved the train scene (and then kept asking where is the train). It is unusual for me to actually “prepare” to see a movie, by the way. But it did mean that I had the plot sharp in my head and that I could directly compare the two movies.&lt;/p&gt;&lt;p&gt;First, in terms of the plot. It was &lt;em&gt;funny&lt;/em&gt;, especially since I got a kid now and could appreciate a lot more of the not so subtle digs at parenthood. &lt;/p&gt;&lt;p&gt;Second, in terms of visuals, wow, it improved by a lot. The original movie held up really good in terms of visuals in the past 12 years, but the new one is visibly better in this term. &lt;/p&gt;&lt;p&gt;Also, at this point I nearly got a heart attack because a talking book (again, my daughter) starting neighing at me at the middle of the night just as I got into the house. &lt;/p&gt;&lt;p&gt;Highly recommended. &lt;/p&gt;</description><link>http://ayende.net/blog/183361-C/the-incredibles-ii?Key=7a1efe8c-b4e5-4fe6-97aa-19f4b386b813</link><guid>http://ayende.net/blog/183361-C/the-incredibles-ii?Key=7a1efe8c-b4e5-4fe6-97aa-19f4b386b813</guid><pubDate>Sun, 17 Jun 2018 09:00:00 GMT</pubDate></item><item><title>When I gave up on pointers</title><description>&lt;p&gt;hI started programming with that orange turtle ( I think it was supposed to be green, but we had bad CRT screens ) by drawing stuff on the screen. I think that I was in fifth grade or so. I later graduated to VB (IIRC, that was VB3 or VB4), but my first formal programming education was done in Pascal. And I was pretty good (for a high school kid who merely dabbled), but I just couldn’t figure out pointers. I mean, they made absolutely no sense whatsoever.&lt;/p&gt; &lt;p&gt;Take the example of an “infinite” size stack, that was the example that we were given during class, and I just couldn’t follow it. Take the &lt;a href="http://www.pascal-programming.info/articles/stack.php"&gt;stack example&lt;/a&gt;, like so:&lt;/p&gt; &lt;blockquote&gt;&lt;script src="https://gist.github.com/ayende/3dea785db0fdd025889e74f3a1981426.js"&gt;&lt;/script&gt;&lt;/blockquote&gt; &lt;p&gt;You might notice that this code is limited, if you are storing more than 3 items, the value will be silently ignored, which is probably not what you want. High school me would agree that this is bad, and therefor increase the STACK_SIZE variable to a ridiculously high size, such as 100). That would surely be big enough for everything, right?&lt;/p&gt; &lt;p&gt;I remember really struggling with the concept of dynamic memory management, not so much as because of the API, but because I&amp;nbsp; couldn’t make any sort of sense about what I was supposed to do there.&lt;/p&gt; &lt;p&gt;After high school, I went and high end course in C++. That took about a year, and I highly recommend the course (even though I don’t think they run it), it taught me a lot about basic stuff such as how things actually work. We started with low level C in DOS, and build on top of that all the way to MFC and ATL. And at some point, the instructor introduced dynamic memory management. And it was so blindingly obvious that I never actually realized that I’m learning the same concept that gave me so much grief in the past. &lt;/p&gt; &lt;p&gt;I had that experience several times since then. I try to learn something, and I just bounce, hard. At a while later, I do the same thing, or fight a slightly&amp;nbsp; different, and get it. Bug I’m no sure how I go from “what the hell” to “oh, this is obvious”. &lt;/p&gt;</description><link>http://ayende.net/blog/177186/when-i-gave-up-on-pointers?Key=cdc2ce5c-b135-423f-9731-e2e55d3fb9a6</link><guid>http://ayende.net/blog/177186/when-i-gave-up-on-pointers?Key=cdc2ce5c-b135-423f-9731-e2e55d3fb9a6</guid><pubDate>Thu, 09 Mar 2017 10:00:00 GMT</pubDate></item><item><title>Why RavenDB isn’t written in F#, or the cost of the esoteric choice</title><description>&lt;p&gt;In a &lt;a href="http://ayende.com/blog/170753/boldly-confidently-fail-it-is-better-than-the-alternative?key=de1552af4b1d41feae139b7639f825bc"&gt;recent post&lt;/a&gt;, a commenter suggested that using F# rather than C# would dramatically reduce the code size (measured in line numbers).&lt;/p&gt; &lt;p&gt;My reply to that was:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;F# would also lead to a lot more complexity, reduced participation in the community, harder to find developers and increased costs all around.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;And the data to back up this statement:&lt;/p&gt; &lt;p&gt; &lt;table cellspacing="0" cellpadding="2" width="400" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="200"&gt;&lt;a href="http://www.indeed.com/jobs?q=C%23+Developer"&gt;C# Developers&lt;/a&gt;&lt;/td&gt; &lt;td valign="top" width="200"&gt;&lt;a href="http://www.indeed.com/jobs?q=F%23+Developer"&gt;F# Developers&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="200"&gt; &lt;p&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/Money_9BE0/image_7.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/Money_9BE0/image_thumb_2.png" width="130" height="110"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/td&gt; &lt;td valign="top" width="200"&gt;&lt;a href="http://ayende.com/blog/Images/Windows-Live-Writer/Money_9BE0/image_4.png"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://ayende.com/blog/Images/Windows-Live-Writer/Money_9BE0/image_thumb_1.png" width="181" height="117"&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Nitpicker corner: Now, I realize that this is a sensitive topic, so I’ll note that this isn’t meant to be a scientific observation. It is a data point that amply demonstrate my point. I’m not going to run a full bore study.&amp;nbsp; And yes, those numbers are about jobs, not people, but I’m assuming that the numbers are at least roughly comparable.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The reply to this was:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;You have that option to hire cheaper developers. I think that the cheapest developers usually will actually increase your costs. But if that is your way, then I wish you good luck, and I accept that as an answer. How about "a lot more complexity"?&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Now, let me try to explain my thinking. In particular, I would strongly disagree with the “cheapest developers” mentality. That is very far from what I’m trying to achieve. You usually get what you pay for, and trying to save on software development costs when your product is software is pretty much the definition of penny wise and pound foolish. &lt;/p&gt; &lt;p&gt;But let us ignore such crass terms as money and look at &lt;em&gt;availability&lt;/em&gt;. There are less than 500 jobs for F# developers (with salary ranges implications that there isn’t a whole lot of F# developers queuing up for those jobs). There are tens of thousands of jobs for C# developers, and again, the salary range suggest that there isn’t a dearth of qualified candidates that would cause demand to raise the costs. From those numbers, and my own experience, I can say the following.&lt;/p&gt; &lt;p&gt;There are a &lt;em&gt;lot&lt;/em&gt; more C# developers than there are F# developers. I know that this is a stunning conclusion, likely to shatter the worldview of certain people. But I think that you would find it hard to refute that. Now, let us try to build on this conclusion. &lt;/p&gt; &lt;p&gt;First, there was the original point, that F# lead to reduced number of lines. I’m not going to argue that, mostly&amp;nbsp; because software development isn’t an issue of who can type the most. The primary costs for development is design, test, debugging, production proofing, etc. The act of actually typing is pretty unimportant.&lt;/p&gt; &lt;p&gt;For fun, I checked out the line count numbers for similar projects (RavenDB &amp;amp; CouchDB). The count of lines in the Raven.Database project is roughly 100K. The count of lines in CouchDB src folder is roughly 45K. CouchDB is written in Erlang, which is another functional language, so we are at least not comparing apples to camels here. We’ll ignore things like different feature set, different platforms, and the different languages for now. And just say that an F# program can deliver with 25% lines of code of a comparable C# program.&lt;/p&gt; &lt;p&gt;Note that I’m not actually &lt;em&gt;agreeing&lt;/em&gt; with this statement, I’m just using this as a basis for the rest of this post. And to (try to) forestall nitpickers. It is easy to show great differences in development time and line of code in specific cases where F# is ideally suited to the task. But we are talking about general purpose usage here.&lt;/p&gt; &lt;p&gt;Now, for the sake of argument, we’ll even assume that the cost of F# development is 50% of the cost of C# development. That is, that the reduction in line count actually has a real effect on the time and efficiency. In other words, if an F# program is 25% smaller than a similar C# program, we’ll not assume that it takes 4 times as much time to write.&lt;/p&gt; &lt;p&gt;Where does this leave us? It leave us with a potential pool of people to hire that is &lt;em&gt;vanishingly small. &lt;/em&gt;What are the implications of writing software in a language that have fewer people familiar with it?&lt;/p&gt; &lt;p&gt;Well, it is harder to find people to hire. That is true not only for people that your hire “as is”. Let us assume that you’re going to give those people additional training after hiring them, so they would know F# and can work on your product. An already steep learning curve has just became that much steeper. Not only that, but this additional training means that the people you hire are more expensive (there is an additional period in which they are only learning). In addition to all of that, it will be &lt;em&gt;harder&lt;/em&gt; to hire people, not just because you can’t find people already experienced with F#, but because people don’t want to work for you.&lt;/p&gt; &lt;p&gt;Most developers at least try to pay attention to the market, and they make a very simple calculation. If I spend the next 2 – 5 years working in F#, what kind of hirability am I going to have in the end? Am I going to be one of those trying to get the &amp;lt; 500 F# jobs, or am I going to be in the position to find a job among the tens of thousands of C# jobs?&lt;/p&gt; &lt;p&gt;Now, let us consider another aspect of this. The community around a project. I actually have a pretty hard time &lt;em&gt;finding&lt;/em&gt; any significant F# OSS projects. But leaving that aside, looking at the number of contributors, and the ability of users to go into your codebase and look for themselves is a major advantage. We have had users skip the bug report entirely and just send us a Pull Request for an issue they run into, others have contributed (significantly) to the project. That is possible only because there is a wide appeal. If the language is not well known, the number of people that are going to spend the time and do something with it is going to be dramatically lower.&lt;/p&gt; &lt;p&gt;Finally, there is the complexity angle. Consider any major effort required. Recently, we are working on porting RavenDB to Linux. Now, F# work on Linux, but anyone that we would go to in order to help us port RavenDB to Linux would have this additional (rare) requirement, need to understand F# as well as Linux &amp;amp; Mono. Any problem that we would run into would have to first be simplified to a C# sample so it could be readily understood by people who aren’t familiar with F#, etc.&lt;/p&gt; &lt;p&gt;To go back to the beginning, using F# might have reduce the lines of code counter, but it wouldn’t reduce the time to actually build the software and it would limit the number of people that can participate in the project, either as employees or Open Source contributors.&lt;/p&gt;</description><link>http://ayende.net/blog/170849/why-ravendb-isnt-written-in-f-or-the-cost-of-the-esoteric-choice?Key=c9224e53-7bbe-4737-80bb-4a0809c21eb9</link><guid>http://ayende.net/blog/170849/why-ravendb-isnt-written-in-f-or-the-cost-of-the-esoteric-choice?Key=c9224e53-7bbe-4737-80bb-4a0809c21eb9</guid><pubDate>Fri, 15 May 2015 07:12:00 GMT</pubDate></item><item><title>My view on crowd funding</title><description>&lt;p&gt;After my &lt;a href="http://ayende.com/blog/170658/funding-options"&gt;previous post&lt;/a&gt;, I was asked what I’m thinking about the notion of crowd funding, which is currently all the rage.&lt;/p&gt; &lt;p&gt;The answer is complicated. I’m focusing right now on things like kick starter and its siblings, because I’m familiar with how they work. The basic premise is pretty great. You have some idea (usually a product) that require initial capital and has some well known market. By directly contacting the target audience, we can get the seed money, judge demand and have very low risk overall. The “investors” put in small amount of money, which loss they can tolerate without hardship. The project get money for very little effort and get great marketing along the way.&lt;/p&gt; &lt;p&gt;This is great, if you are doing a product. Something that can be sold. For instance, let us say that we want to do a major feature, like adding time series capabilities to RavenDB. Let us say that we start a kick starter campaign for this, asking for 150,000 USD and promising backers that they’ll get a free license out of early sponsorship. &lt;/p&gt; &lt;p&gt;I’ll get into the exact costs associated with this option in a bit. But before we go there, remember the premise of my previous post. It isn’t money to build a specific product. It is money that is required to purchase something for the business itself. Of course, buying that cool car will raise morale and I have a spreadsheet that says that it will increase the effectiveness of the team by 17.4% (although it will decrease parking space by 37%). So it make sense to go with that, from a business perspective. However, there is very little that I can do to actually make people want to back “we want a cool car” notion. At least, I don’t think so, but the internet does have some dark corners.&lt;/p&gt; &lt;p&gt;Back to the notion of using this to build products. There is a very basic problem here. RavenDB isn’t targeting individuals. It is a database platform, and most of our customers are businesses or enterprises. That lead to a very different mindset. Speculative investment in something like this is going to be much rarer, harder and fraught with issues. An Open Source project can do that, but it make sense to invest in a project a business is using, but there are very few who actually manage to do that. A quick search of kick starter doesn’t show any major open source soliciting funds there. &lt;/p&gt; &lt;p&gt;Kick starter make sense for personal stuff, things that you actually get to hold, or need to buy. Something of some scarcity. Doing this for commercial software make very little sense, and for open source, it is even a bigger problem. For open source projects that depend on donations, usually you have a valid commercial reason for people &lt;em&gt;to&lt;/em&gt; donate (Linux, Wikipedia, etc).&lt;/p&gt; &lt;p&gt;I’m open for contrarian point of view, mind. But I don’t think that crowd funding is applicable for the kind of things that I would want to use it for.&lt;/p&gt;</description><link>http://ayende.net/blog/170721/my-view-on-crowd-funding?Key=abc06493-9fc8-449c-b358-e1aee61f48b2</link><guid>http://ayende.net/blog/170721/my-view-on-crowd-funding?Key=abc06493-9fc8-449c-b358-e1aee61f48b2</guid><pubDate>Fri, 01 May 2015 09:00:00 GMT</pubDate></item><item><title>Picture of the day, Rhino &amp; Raven</title><description>&lt;p&gt;
	We have an amateur photographer in the office, who like to arrange the rhinos in the office (now exceeding 100, I think) in various ways.&lt;/p&gt;
&lt;p&gt;
	I really like this picture.&lt;/p&gt;
&lt;p&gt;
	&lt;img src="https://scontent-fra.xx.fbcdn.net/hphotos-xpf1/t31.0-8/s960x960/11021371_674157669361368_4459211590040181270_o.jpg" /&gt;&lt;/p&gt;
</description><link>http://ayende.net/blog/170273/picture-of-the-day-rhino-raven?Key=bb892c64-4cb8-45a1-9c48-853881d84c42</link><guid>http://ayende.net/blog/170273/picture-of-the-day-rhino-raven?Key=bb892c64-4cb8-45a1-9c48-853881d84c42</guid><pubDate>Wed, 25 Feb 2015 13:00:00 GMT</pubDate></item></channel></rss>