Why does this not exist? The “most amazing” restaurants


TNG always discussed the possibility of holodecks. I don’t think we have this tech at all yet, but what if instead of having a full holodeck, we can have a room which whisks you away to another world. What if we can enjoy our most amazing french dinner while feeling like we are sitting in Paris? Or perhaps enjoy a delicious jamaican meal – complete with fantastic rum – feeling like sitting right next to the beach, complete with sounds and smells?

So real it scares you.

Watch the following. It’s really mean, but it makes a good point.

It’s a screen, so realistic that the most absurd visuals on it, combined with good sound effects and some other special effects, convince people the city is really being destroyed.

Now, this is a mean-spirited prank, and the screen isn’t cheap. What if we took this idea and went with it a bit further.

Let’s expand this a bit.

Obviously we can imitate a single window effectively, LG just proved that. Probably with little work we could do an entire wall, possibly all walls in a room. We have had ultra realistic sound for pretty much a few decades now. We can easily do scents to match a specific video. Combine these elements and you have a room where you can be whisked away to anywhere in the world pretty realistically, for example, Paris, complete with sound and smell.

Mmmm, you can really smell the urine.

However, this would not be cheap, my estimates would be that it wouldn’t be that much more expensive than a fully decked out VIP section in a expensive restaurant or club. Now, people spend tons of money in a club or restaurant, and the more unique the experience the more people will shell out. So, why not put two and two together.

In the words of Gordon Ramsay.

Why not have a restaurant or club where you can rent the “holodeck” room. Where you experience is not just the food and drink, but travelling the world. Enjoying the food in the atmosphere it was meant to be enjoyed in. It would be the “most amazing” experience ever to enjoy with your food. Every aspect of it would be controlled; temperature, scents, sights, sounds.

You wouldn’t be able to walk past the walls, mind you, but who goes for a walk around when they are eating food anyways. The atmosphere would just be designed to amplify the enjoyment of the meal. The chef would not only be able to determine what you eat, but precisely what environment is around you to enjoy it in. Suddenly, the restaurant experience becomes complete and fully adaptable to the chef’s whims.

Why does this not exist?

“No one would pay for it!”

People are already paying a fortune for dinner experiences like the following:

I just hope it doesn’t rain.

Why would they not pay for the experience of enjoying something like that in a perfectly controlled environment? The investment isn’t anything more than the investment in these luxury clubs and restaurants, especially since you don’t need to put it on top of a building or in a very expensive location. You could build room after room, each one giving a tailored experience to your guests.

Techies are not chefs. (or chefs are not techies)

To put this politely, you are full of brown stuff if you actually believe this. Google Molecular Gastronomy and then we can chat.


This is risky, but starting a high-end restaurant is risky. If you aren’t willing to try something new that makes you stand out, you probably shouldn’t invest in one in the first place. If you can pull this off, combined with good food, you will easily book every room for every day.


This is just a neat idea, I realized it was possible when I saw OLEDs and 3d video without glasses at CES a couple of years back. Still kinda amazed no one is trying it out. Maybe we will see one soon.

Windows 8 is not secure.

From Business Insider:

According to leaked internal documents from the German Federal Office for Information Security (BSI) that Die Zeit obtained, IT experts figured out that Windows 8, the touch-screen enabled, super-duper, but sales-challenged Microsoft operating system is outright dangerous for data security.

It allows Microsoft to control the computer remotely through a built-in backdoor. Keys to that backdoor are likely accessible to the NSA – and in an unintended ironic twist, perhaps even to the Chinese.

I originally really wanted to upgrade to Windows 8 because it looks sexy, but at this point I’m actually starting to plan a move to Linux. Most of the tools I use are now available on Linux (or function properly in WINE).

If you are a law office, or need to obey PIPEDA or other privacy laws or similar, Windows 8 is pretty much unusable by you. If there is a known backdoor in the system, it can be used by other individuals and since you are aware, you are knowingly breaking any confidentiality agreements you have with your clients.

In context, Panda Rose is pretty much forbidden to use any American servers for some of our government contracts because the data is considered confidential and the Canadian (and Ontario) governments do not believe that the data can be kept private on an American server.

Enhanced by Zemanta

Hardening your SSH server (opensshd_config)

I don’t think this really adds anything to the security, but it looks cool.

With all of the NSA spying and privacy items out there, I thought I’d write a quick post on easy ways to lock down your SSH server for people who may want to make some tweaks to their sshd_config on their Ubuntu (or other Linux) installations. This article specifically covers opensshd_config settings. PAM settings and other SSH related settings will come later.

I have a series of bash scripts that generate these settings automatically. If you are interested, let me know and I will send you them. Note: everything in <<Code>> format references a line in your /etc/ssh/sshd_config. If you don’t see the line (or similar) anywhere, then you may need to add the line.

Some of the items below prevent information leakage, a determined adversary will be able to get around them, but it will prevent script kiddies and scanning attacks, easing the load on your server.

Port Settings

If possible, you should not use port 22 as the SSH port.

Port 22

Instead you should choose another unused port randomly and set that as the SSH port. For example:

Port 6920

There are many circumstances, however, where a client’s IT will not permit a non-SSH port to be open on their firewall. In these circumstances, leave the port as port 22. This is not a high security change. This change avoids automated SSH attacks and allows the server to have a lower profile if the ports are scanned.

IP Listen Address


Try to avoid having ListenAddress set to (All IPs). If there are multiple IPs available to the machine, a specific IP should be used for SSH and no other services. This will allow for easier auditing, as well as more difficult matching up specific websites to specific SSH servers.

This also allows you to set up very specific rules on the firewall for this machine. As well, it ensures that you know precisely where the SSH is open. If you are only to have it open on the internal network, this will naturally restrict it to that.

Protocol Version

Protocol 2

SSH protocol version 1 (SSH-1) has known man-in-the-middle attacks problems and myriad security vulnerabilities. SSH-1 is formally obsolete and should be avoided at all cost.

Privilege Separation

UsePrivilegeSeparation yes

UsePrivilegeSeparatation sets up a child process to deal with any incoming traffic. Only after the user successfully authenticates will it give them the privilege of the authenticated user. This is so that if any of the incoming traffic corrupts the process, there will be no privilege escalation.

While this is usually by default “yes”, it should be listed as a line item in sshd_config to ensure that it is on.


SyslogFacility AUTH
LogLevel INFO

Logging should be set to go to the /var/log/auth.log facility by using the SysLog AUTH parameter. This will ensure that any problems around invalid logins or the like are forwarded to a central security file for auditing purposes.

Allowed settings for LogLevel at Panda Rose are ERROR, INFO, VERBOSE. In general, LogLevel should be INFO if diskspace is not a concern, however it should not go to DEBUG levels as that will violate the privacy of users. If disk space is a concern, LogLevel should be at ERROR and it should be gzipped and stored on a regular basis for auditing purposes.. VERBOSE should be used for debugging purposes if necessary. However, it should not be on as the default LogLevel as the data it produces is far more difficult to audit than either ERROR or INFO.


LoginGraceTime 120

This is the time allowed for a non-authenticated user to stay connected to the system. Commonly 120 seconds is the default. You can set this lower to avoid this being a DDOS vector, however 120 seems to work well for most circumstances.

PermitRootLogin no

There is no circumstance that this value should be anything other than no.

StrictModes yes

StrictModes specifies whether sshd checks to ensure a user did not make their .ssh directory and files writable by anyone other than its rightful owner. If the permissions are wrong, then the user cannot log in. As a security tool this prevents a hostile user or a hacked account from gaining access to other user accounts (and possibly administrative access) to the server.

PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys

Public Key Authentication is recommended for general use. This functionality allows users to create password-protected public/private keypairs using a facility like Puttygen or ssh-keygen and then connect securely using said private/public key pairing. Instructions for how to properly create one of these keys is explained in a later article on client security procedures.

IgnoreRhosts yes

This prevents issues around HostbasedAuthentication. While not likely a big issue, it should be set to ignore them.

HostbasedAuthentication no

In circumstances where the server is an independent, secure server, HostBasedAuthentication should be set to no.  When there are multiple servers that are not all necessarily secure servers, and a need to have a centralized server handing HostbasedAuthentication, this can be set up. This will be discussed in further detail in a later article.

PermitEmptyPasswords no

This one is just simple common sense one. No one should be able to login if they don’t have a password.

ChallengeResponseAuthentication yes
UsePAM yes

This is related to the PAM based authentication set up for root users to be explained in another article. This allows Google Authenticator or another token-based or biometric-based authentication system to be implemented to improve security security for administrative users.

UsePAM allows us to set up PAM to use these extra methods of authentication for logging in administrative users.

KerberosAuthentication no
GSSAPIAuthentication no

For the purposes of most installations, neither Kerberos nor GSSAPI-based systems will be used.


X11Forwarding no

Unless absolutely needed, X11 shouldn’t be running on a Linux server open to the web. X11 Forwarding should be off. In circumstances where X11 Forwarding is on, treat the server as a secure Linux client and not a server.

GatewayPorts no

In most cases individuals won’t be using your server as a gateway to other machines. Set GatewayPorts to no to ensure that any port forwarding is limited to the local machine. If this needs to be set to yes, make a note of it in that server’s details document for future audits.

Information Leakage

PrintMotd no

While a message of the day seems useful, in many circumstances it gives away information to end users who may not be administrators that they should not be aware of. This setting is by default on for many Ubuntu installs, it should be turned off.

PrintLastLog yes

This will print the IP, date and time of the last user login for that user. This is useful information as it can give a user a hint if someone were to gain access to their account. Leave this one on.

Prevent zombies

TCPKeepAlive yes

To avoid infinitely hanging sessions, this should be left on. This will send TCP keepalive messages to determine if the client has gone down. If the client goes down or the connection is interrupted, it will be noticed and the server will end the session. To avoid consuming server resources with “ghost” users, this should be left on.

Some users may complain since it implies if the route goes down temporarily, the connection will die. In these circumstances, determine if their needs require this to be turned off. Turning this off has no security implications.

Legal banner

Banner /etc/issue.net

This will display a banner before a user logs into the server. For clients who have their own legal team, a proper banner should be requested from them for their servers. Panda Rose’s standard banner is as follows:

 You are accessing a Panda Rose Consulting Studios (PRCS) managed 
Information System (mIS) that is provided for authorized use only.
 By using this mIS (which includes any device attached to this mIS), 
you consent to the following conditions:
 * PRCS routinely intercepts and monitors communications on this mIS.
 * At any time, PRCS may inspect and seize data stored on this mIS.
 * Communications using or data stored on this mIS are not private. 
They are subject to routine monitoring, interception and search. 
They may be disclosed or used for any PRCS authorized purpose.
 * This mIS includes security measures (e.g., authentication and 
access controls) to protect PRCS and our clients' interests -- 
not for your personal benefit or privacy.

Your IP has been logged.

Contact your lawyers, or make an adjusted version to fit your needs.


Ciphers blowfish-cbc,aes256-cbc,aes256-ctr
MACs hmac-sha2-256,hmac-sha2-512,hmac-sha1

Restrict Ciphers and MACs to the best secure ciphers. While not a real issue, this shows attention to detail. HMAC-SHA1 is required since PuTTY does not support the other algorithms yet.

Restrict Users

AllowUsers name1,name2

It is a good practice practice to limit the SSH to only users who should have access to it, this is done with an AllowUsers line at the end of the sshd_config listing the users who can log in with SSH.

Final thoughts

The above are suggestions, and over time may change to fit the needs. At the end of the day, these settings are just a small piece of ensuring your server is secure. Most of the determined attacks on your server will be based on zero-day vulnerabilities or other security holes, many of which are not even related to SSH. Ensure your server is up to date regularly, and always audit your logs to detect break-ins. You can use a tool like logcheck or logwatch to aide you in this process.

This article is crossposted at Panda Rose’s blog

Why does this not exist? Real e-books.

This is the first article of what I hope to be a series of discussions on products that seem to have all the pieces in existence, but for some reason no organization with enough capital has invested in it. This doesn’t mean there aren’t technical challenges in implementing it, but rather I know of no company doing it, even though the tech exists.

I want an e-book, not an e-page

Today’s topic is real e-books, not the tablet style Kindle or Nook which are essentially glorified screens with the ability to read more than one article. Rather, a book with real pages that you can turn and update to have any content you want. While I like the fact we at least have the ability to read books digitally in a nice fashion, I still think we are falling short of the real capabilities of e-ink and digital technology.

Cool, but not really an e-book, closer to an e-page.

To get the vision clear, please note that a book is not a single page. A single page is essentially a pamphlet or brochure. When I read a book, there is the physical enjoyment of turning the pages of the book, but even more so, the ability to position physically different parts of the book so I can flip back and forth to compare and contrast what I’m reading.

This is especially useful for text books. However, it is a real part of the book reading experience that is fundamentally lost with any of the existing e-book readers.

ooooh pages.

So, with that in mind, what am I envisioning? I’m envisioning a digital tool with multiple screens made up of e-ink, say 50 pages worth. With the front page I can load a book (or at least 100 pages of the book) into the reader and then I can start reading, flipping the pages myself rather than having to click on a next page/previous page set of buttons.

Pieces of the Puzzle

Bendable, think e-ink pages.

That looks like it’s bending to me.

This technology has been kicking around for over a decade now. At the last CES, Sony, LG, and a variety of other providers were showing not only that it bends, but that it’s a lot more durable than ever. I don’t think it’s impossible to make one that would last a while now.

Small Electronics

Small enough for you?

You don’t need a lot of power in a processor to generate a page that remains static on an e-ink screen. The arduino micro is an extreme example of how small you can get, but to be honest, the fact we can pack the equivalent to a computer I had 12 years ago into an iPhone demonstrates to me that this tech isn’t the hangup.

Small power source

Again, look at the kindle, it is lightweight and has a tiny battery with a good battery life. I don’t see how you could not resize this to fit into the binding of a book.

Why does this not exist?


This is the only hangup I can find. How can you manufacture these cheaply? My bet is that once you have a plan to sell enough of these, the price of the bendable e-ink screens drops. Similar to how the retina screens on the iPhones got cheaper suddenly once there was a demand for them. This is the biggest question mark in the “why does this not exist?” category. However, price, to me, always seems like something that is solvable given good quality industrial engineers.


Maybe I’m the only person who would love to have a digital book I can flip pages with.

Patents/Unknown tech restraints

I am unsure of the legal atmosphere around this technology. It could be that e-ink pages are patented by someone who wants too much money for the rights to use it.


I have been dreaming of making this for almost 10 years now, I just haven’t been able to build a functioning mock-up or prototype due to the fact I don’t know where to get e-ink screens that are bendable at a reasonable price. Arduinos and programming is easy, it’s the screens where I get stuck.

Hopefully someone out there is building this, because this would be a true e-book and replace my entire bookshelf with one, totally awesome, book.



Tempus Fugit, Memento Mori

Memento Mori

Thoughts after a long night chatting with James McTavish and Joe Stauttener on Wednesday.

Tempus Fugit, time flies. Our lives are but short instants on this planet, a place to touch those around us, bear children (if we can), build a better world for the next generation, and remember that we all reach the same end. We have the ability to be more than of this world, but to do that we must free ourselves from its chains of bondage. Not only from man, but from ourselves. To worship and praise our bodies but not become slaves to them. No slave truly loves and worships its master, many only obey it grudgingly.

You see, we have one feature animals don’t, we have the ability to resist all of our instinctual urges, no matter how difficult it may be. Sin is not permanent failure, it is the natural expectation of being human. We will sin, there is no way around it. What matters is we are forgiven and can try to do better each week. In the Catholic mass, I find that the three statements of “Mea Culpa – Through my own fault” are a stark reminder of this.

However, in the very same mass, we state that we can be forgiven, and by the end we are. This allows us to go clean into the world for the next week and improve ourselves. Remembering at all times Tempus Fugit.

Some may say it is God’s grace and blessing on us, hence the song Amazing Grace. We can fail in our resistance, but the forgiveness gives us the strength to fight again for self freedom, to be beyond this world.

It is excuse to state that being a slave to your body is somehow freedom. Freedom is not only not being a slave to a person, but not being a slave to anything, including ourselves.  What is worse, once you are a slave to your body, you will forget the most important thing, death will come to us all.

Through remembering death, we can remember that our temporary satisfying of those instinctual urges don’t matter. We become only of this world, and the more we are that, the more we will cease when death arrives.

Memento Mori, remember death.

This is not dark or grim, this is a bright light for anyone who understands it. If you look, you will see those chains, and realize that they can be broken, and we can be more than of this world.

You can actually be free.

Working together… taking risks together.

Landing (Photo credit: Rhubarble)

44 years and one week ago, we worked together and landed on the moon. We invested massively as a society and we all took the risk that the mission may fail. Yet, we came out of it benefiting not only from the pride of such an amazing achievement, but also by the myriad technologies developed by the process to achieve said achievement. No money was made, no one became dirty rich over it, if it failed it would have ruined no one’s lives except the individual astronauts who were willing to take the risk for all of us and yet, we all gained in the long term.

We gave up short term gain by investing money, sweat, blood and tears on such a grand venture for all mankind.

We would have all gained from the investment in engineering and research regardless of the success of the mission, and a few heroes who went on that flying firework were the ones that took all the risk.

Business firms like Xerox invented  the PC as we know it (ethernet, GUI, etc.) They worked to create long-term value for their business, not simply to get short-term gain at all costs.

Wouldn’t that be nice if we could get over our religion of individualism and do the same today?

The ultra-individualism developing over the past decades has lead to short-term thinking, massive risk-taking and wholesale destruction of the social contract that kept all of us united and building a better world together. We excuse it because of the myth that anyone, without regards to luck, familial connections or access to capital can somehow become an individualistic God (read: billionaire) by simply working hard on that idea that changes everything.

Yes, some people have done that and helped the world – Steve JobsBill Gates, etc. However many, many more have not and what’s worse is many have discovered the best way to become a God in an individualistic secularist world is to cheat the system, find the loopholes where you can make money without adding value, where you can perform rent-seeking.

Firms like FedEx and UPS cut costs by providing terrible customer service because it saves them money in the short term, even though it could cost them customers in the long term. They rely on the barrier to entry of cost to get away with it, just as the wireless carriers in Canada regularly work to ensure that no real competitor exists against them so they can provide the worst quality server and most expensive data plans without fear of repercussions.

Many businesses have stopped trying to create value for society, instead trying to make competition difficult, if not impossible.

Our government systems have evolved from systems which work to improve the well being of all, into systems designed to maintain the status quo and only help those who are already successful – social darwinism by any other name.

We had a grand financial and economic experiment for the past 20 years. An experiment designed to take the wealth of the richest people and increase it without adding any significant value to the economy, all without risk – rent-seeking on a grand scale. These investments were nothing like the risky investments by the rich English bankers in the days of exploration – investments to build boats to bring the riches of the orient back to Europe or investments into building railways to connect millions and allow factories to be built. These investments were designed to be risk-free money producing money without any consideration for the production of value for society as a whole.

This whole house of cards collapsed in 2008.

Trillions of dollars were wiped from the account books in an instant and most Americans, heck most people worldwide had no say in this risk-taking, so their hands should have been clean when it failed. Those who taken the risk should bear the brunt of that gamble failing.

Yet, they haven’t.

In fact, those who did the risk-taking, those who gambled and lost have come out better than before from this. The economy has already recovere for them. Yet the contractors who build their houses, the factory labourers who build their goods, their software programmers who program their software, the doctors and nurses who take care of them, the teachers who taught them, the workers who pave their roads, even the barristas who makes their coffee are all still paying for their failure, and worse the government – our government – has made it clear that they aren’t going to even try to get any of the money back from them. The true failures of the experiment suffered nothing (or barely) while we, the labourers and the creators, suffer the most to save them from becoming failures.

We suffer in order to save these people from becoming fallen Gods, even though that’s what they already are. We are all sacrifices at the alter of individualism.

We went over 40 years from a world where the heroes brought back pieces of the stars to us, to a world where we all have to sacrifice to the fallen Gods of our individualistic religion, even if it costs us our soul as a united society.

Enhanced by Zemanta

La grande erreur de l’économie.

English: Graph illustrating the Brander Spence...
English: Graph illustrating the Brander Spencer model (Photo credit: Wikipedia)

Avant que j’écrive cet article, il faut que j’excuse mon français. J’ai voulu pratiquer mon français en écrivant dans mon blogue pendant de nombreuses années, mais je n’ai pas eu la confiance d’écrire sur les sujets que j’aime en français. Ceci est mon premier essai. Cela dit, on y va.

Présentement, je lis un livre de Robert Ulanowicz, «The Third Window». Cette un livre sur les problèmes de science  écologique. Spécifiquement les nombreuses tentatives d’appliquer le réductionnisme de physiques sur le terrain. L’hypothèse de Ulanowicz’s est que la complexité inhérente dans le terrain rend ce programme impossible parce qu’une seule action peut changer tout le mécanisme dans l’objet d’étude. Une autre structure pour l’étude est requise, ou au moins c’est impératif à reconnaître les limitations extrêmes des modèles.

Je pense que c’est la même chose en économie, mais je pense aussi que beaucoup, si pas toutes, les personnes dans ce terrain ne considèrent pas ce problème. Ils sont trop obsédés par l’aide d’un programme de recherche comme celui des physiques – un programme basé sur le réductionnisme.

Ce programme est condamné à l’échec.

En finance, Nassim Taleb discute l’ idée du «Black Swan». Bien qu’il soit possible de définir une modèle où un grand nombre de traits observés existent, un seul incident peut changer l’ensemble du mécanisme. Alors, le modèle est complètement faux. C’est parce que le modèles comme ceux des physiques exigent que le système ait une distribution de probabilité simple – par exemple, une distribution de courbe en cloche.

C’est un château de cartes. Ce sera toujours un château de cartes.

Par exemple, si ce problème arrive en physique. Ce serait comme s’il y avait toujours une particule qui dévaste tout, et les particules arrive tout le temps. L’intégralité de l’étude de la physique devrait être réécrite toutes le quelques semaines. Ce serait inutile. Personne ne perdrait son temps à l’utiliser.

Mais, en économie, les décisions majeurs sont prises régulièrement avec ces modèles. Des décisions qui affectent des millions au quotidien. La science n’est pas une science. C’est une idéologie avec une mythologie construite à partir de fausses prémisses.

Je pense qui c’est le temps que ces décisions soient effectuées sans cette fausse science mais avec la reconnaissance que les décisions soient idéologiques. Les décisions le sont parce que les politiciens croient c’est la meilleure chose à faire. Cessons d’essayer de prétendre qu’il n y a aucune science derrière les décisions. Les décisions sont toutes idéologiques.

C’est le mensonge qui anime nos mauvaises décisions politiques.

C’est pourquoi une grande partie du monde doit avoir de nombreux problèmes.

Ou alors, il faut construire une nouvelle science de l’économie. Qu’on ne la fonde pas sur le culte de cargo du réductionnisme, mais sur la réalité que nous ne pourrons jamais comprendre comment fonctionne l’économie, sauf dans de rare circonstances simples.

Lorsqu’on n’a pas besoin d’un modèle de l’économie.

Mathematical tomfoolery: factoring as a geometric problem

RSA encryption… it’s really that easy.

So I’ve always been fascinated by the problem taking a number n = pq and trying to factor it efficiently. While there is a good reason this is worth working on – RSA public key cryptography is dependent on the difficulty of this – I originally just found it fascinating: it seemed that all of the information about the factorization must be somehow contained in n. Simply becausewhen you multiply the factors together no information is lost.

Here’s a way to think about it, let’s say p and q are prime numbers, and let n = pq. Now, if we had any loss of information, then factoring n completely would provide more than one answer. However, that is impossible, however I will leave the exercise of proving that any factorization of n is unique to the reader.

The only information I can see that is lost is the ordering, and that is really insignificant to the original problem – what did I multiply together to produce n.

While playing with this, I keep on finding interesting things to play with. Obviously I haven’t “solved” the problem; otherwise I’d be doing my PhD at UofT. This lack of progress is not surprising considering this is a difficult problem people have been working on for centuries.

I have many many pages of notes, and so, I decided, screw it, I will just share these on my blog and maybe someone will have an idea that pushes me a bit further. Heck, maybe a professor of math will see it and invite me to do my PhD with them around this.

Each idea really deserves it’s own summary post, so I will start with the first approach I’ve played with for the longest.

Solving factoring is solving a simple diophantine equation.

I’m going to distill hundreds of pages of notes into the following, this is the tip of the iceberg when it comes to interesting results from this method. If there is a piece you want me to expound further on, let me know. If I find a particular theorem work going through I will post it in a later post.

The whole idea behind this is the following proposition:

Given, n = pq, p,q \in \mathbb{P}, p,q > 2

It is true that n = (l-k)(l+k) = l^2-k^2, l,k \in \mathbb{N}

where l \neq (n+1)/2, p= (l-k), q=(l+k)

Thus, given an n where we know n = pq: p,q odd, then we can easily see that l = (p+q)/2, and k=l-p, for p<q

Hence p=l-k, q= l+k. So now you just have to solve for l and k. This is a whole lot harder than it sounds. In fact it’s really just one step away from a Heronian triangle; A triangle where all sides are integers. In fact, this leads to an easy proof for finding Heronian triangles, but I will leave that to the reader.

In short, this problem reduces to solving the following diophantine equation.

l^2 = n + k^2

For the more geometrically minded, this means factoring is solving the following diagram for l,k \in \mathbb{N}.

Geometric Representation for Factoring (© 2013 kjro.se)
Geometric Representation for Factoring (© 2013 kjro.se)

No matter how many different methods I have tried to work with this, I just keep ending right back where I started. My knowledge revolves more around computational complexity, combinatorics and optimization so Diophantine equations are interesting, but I’m not as deep into them as I would like to be.  I know there is a decent amount of work on Diophantine equations, if you have a good text to recommend that might gives some more ideas, let me know.

One other point to make is that for every k,l \in \mathbb{N}, l \neq (n+1)/2 there will be associated non-unique composite number (ie, it will work for other k', l'. Note, for any odd composite number, this representation will exist.

Playing around with this I’ve gotten some other ways of making sieves, but they don’t differ much from the primary techniques. There may be some interesting results this way regardless, possibly around distributions of certain types of numbers.

Next time, I will go through my notes where factoring is seen as solving for roots of an real equation, and how to create a pretty spiffy function that bounces off the x-axis for every integer.


My first Father’s Day weekend.

Small hand – Big hand (If this image doesn’t show up, blame Instagram)

Father’s Day weekend has come and passed; almost perfectly timed with William becoming a social creature. I will admit that before he became social, it was a bit odd taking care of him. He was pretty much a cat that can’t walk around – ie. eat, sleep, poop, repeat. My job was to clean up the poop.

I could try/pretend to play with him and such, but he would barely respond in any way that could be considered social. So, those moments were more me playing with myself.

A little while ago (couple of weeks I think), he started to smile back at mommy and me. the first time that happened, it was pretty amazing. Whether it was an instinctual or automatic response on his part, it still felt like he was finally showing how much he cared and appreciated the efforts we were putting into making him happy and comfortable. He ceased being a cat, and started being more human.

This week, almost as a father’s day gift, he started to talk back in response to me, hold my hand and pull me near when he was lonely, and the very best, squeeze when I held him. I would bet that many people with children would understand this. There is no greater feeling. I wish I could explain it fully.

I can only explain it from my Catholic faith – it feels like pure unadulterated love. The type of love that is described in catechism to young people, who are probably too inexperienced to really understand it. He is no longer needing you there, he is wanting you there. He doesn’t even really know why.

This continued to peak during this Father’s Day weekend; specifically just after Suzanne gave me William’s gift, a cute t-shirt that said “daddy is my hero.” Now, you must admit that was more of a gift for himself, but I can excuse it since he’s still young and learning things like “gift-giving.” I smiled, give him a peck on the forehead and moved on with my day.

Then he started to cry…

and cry…

and cry…

A strange new cry, almost inconsolable. He wasn’t hungry, didn’t have a wet diaper, and wasn’t dealing with the common gas pain; he didn’t want his swing, or his playmat, even a bath didn’t help.

No, he was just crying… a lot.

“I want daddy hugs.” (Again, if no show, blame instagram)

Then I had a strange idea – I sat down on the couch and held him in my arms without walking around or bouncing him. Almost immediately, he went quiet and, even stranger, started to squeeze my sides and closed his eyes. This may seem boring and common, but this was something he had never done before.

In a short period of time, he seemed to have fallen asleep, and I thought, “great! He’s asleep, I can put him down and help mommy with cleaning the house.”

Nope. The moment I put him aside, he immediately returned to inconsolable unhappiness. so, I would pick him up again, he would squeeze and then fall asleep.

After a half-hour or so of this (passed by playing Candy Crush and reading Zite on my iPhone.), I wanted to actually get some work done. So, I asked mommy to come and take him, foolishly thinking it was just the warmth of my body calming him down.


Inconsolable sadness.

He clearly wanted his daddy for Father’s Day.

This could all be coincidence and just lucky timing, but I wonder, deep down, if perhaps he just knew somehow. It was Daddy’s Day, Daddy is his hero, so he wanted to spend as much time with me as possible.

And to be honest, I enjoyed every moment of it.


Enhanced by Zemanta

We live in a panopticon, congrats.

Plan of the Panopticon
Plan of the Panopticon (Photo credit: Wikipedia)

A panopticon is a building designed in the late 18th century by Jeremy Bentham. Designed to be a prison, it allowed a single watchman to observe all inmates of an institution without them being able to tell whether or not they are being watched. It was a method of control, it was a method to ensure compliance, it was a method of punishment.

It was not designed to be something nice for the prisoners, only useful for the watchman who’s job was made significantly easier at keeping everyone in line.

In the last decade, we have built a panopticon in the western society – This is the largest social experiment ever.

The public panopticon

With the Boston Bombing, it made it crystal clear that we now live in a world where there are so many digital photos and videos that given any public event, anyone can watch anyone else with very little effort. With inventions coming down the pipeline like Google Glass, this will simply become that much more pervasive.

Reddit went crazy with amateur detective work during the early days, listing over a dozen different suspects based simply on their dress (The blue robed man), their backpack (Some runner with a similar backpack), the fact they went missing suddenly a few months back (A poor guy with some mental issues who disappeared from his school). All from the multitude of pictures and videos they were able to collect of the event.

All of whom ended up being completely innocent people just standing around watching a marathon. Thank god we don’t have lynch mobs anymore, right? Thank God we have a informed and careful media that doesn’t simply publish unsubstantiated photos of innocent men based on amateur detective work, right?


Crowdsourcing can be a good thing to raise money for good causes, to create new business opportunities, and to build new tools that are freely available for all to use.

However, crowdsourced panopticons are an immensely dangerous tool, and we are exposed to them now everyday. Our privacy disappeared with Twitter, Instagram and Facebook. We can try to take it back, but when a significant portion of your social life and social circle communicates using those tools. There really isn’t any escape without social isolation.

We live in a public panopticon of our creation.

This isn’t a question of privacy anymore, this is a question of actual freedom. There are regularly stories of people losing jobs because of a Twitter post that wasn’t politically correct enough, or of a photo that got posted that shouldn’t have. Individuals are told to be very careful at parties with alcohol, lest one of their friends get a photo of them intoxicated and tag them in it.

We lose our freedom because we are made to be afraid to say the truth, afraid to say our beliefs, afraid to say anything that deviates from popular opinion. Many reasonable voices are silenced, afraid that if they err in what they say, or if they change their mind a few years later they will be punished for their past sins.

We cannot say anything if it isn’t politically correct or “nice”.

The only voices that get heard are the anonymous ones, the ones who already have power, or the loud-mouths who don’t care to begin with. Actual dialogue is reduced to fearful whispers, and arrogant rants. Since we live in a panopticon, many live with an overwhelming fear that we aren’t doing enough, aren’t doing it right, that our mistakes will chase us for the rest of our lives.

We fear that people are watching our every move, our diets, our lives.

We fear the watchmen, but the watchmen are ourselves.

The private panopticon

Joseph McCarthy
“I love Facebook” (Photo credit: History In An Hour)

Today, an oppressive government has no need for a Stazi, it is trivial to see who everyone else relates to simply through their followers and friends on Twitter and Facebook. Joseph McCarthy would have a field day. “Are you now, or have you ever been a communist?” is answered by a quick glance at our Twitter or Facebook timeline.

Even if we didn’t post the items ourselves, it is not hard to data mine and put 2 and 2 together to figure out the answer to that question. This is the entire essence of big data, believed to be used for marketing purposes, but in recent days shown to be used for far more than that.

The NSA and CIA spy on Americans (and non-Americans). This is not surprise, and is a bit of a tautology. However, the extent of the spying still was restricted by the capacity of the technology and, hopefully, the limitations of the law.

The PRISM program disclosure demonstrated that now there is no limitation. They have access to the panopticon we have created to combine with their own already extensive structure.

It is clear that the PRISM program shocked all of us, and seeing it so clearly laid out in those slides demonstrates how complete and penetrating it is in our society. Yet, this is a panopticon our own creation. We built those walls that we lie in, we placed the watchman there ourselves out of fear that one of our our fellow inmates may try to hurt us. This should not be a surprise to anyone.

Now our leaders assure us that this is all perfectly legal, we shouldn’t mind the fact that they can listen into our phone conversations, view our private emails and facebook discussions, that they can watch us at any time with the thinnest of motives. Don’t worry, they won’t abuse it… really.

It’s for our safety you see. It’s to protect us from ourselves.

“If you have nothing to hide, then why worry about it?”

We are all sinners, we all make mistakes. We all have something to hide between us and God. If the watchman can see everything we do, he has the power to make us doing anything he wants. If we disagree with what the watchman feels is nice or right, then we could be in a lot of trouble.

Power has always attracted abuse, and absolute information will bring absolute power to him who controls it the most.

“Power tends to corrupt, and absolute power corrupts absolutely. Great men are almost always bad men.”

Lord Acton in a letter to Bishop Mandell Creighton, 1887

Are we so dull that we have forgotten this? Are we so satiated by our consumer culture that we are ok with giving this power away without a fight?

Information is power, anyone who has studied financial mathematics knows this. Arbitrage and acquisition of money without creation of value is best achieved by a imbalance in information.

The Republicans will do nothing about this, the Democrats will do nothing about this, nor will the Liberals, Conservatives, NDP, Labour Party, or any other party running for office. They want to control the levers of power, not break apart this massive machine. That information is the potential to rule with almost absolute power, why would they ever consider getting rid of it?

What can we do about it?

I don’t know. I know protests are ineffective, as will voting for any politician who is already in the system, and the media doesn’t seem to be having much effect.

Perhaps that’s what many, including myself, missed in Orwell’s 1984. A absolute totalitarian society wouldn’t arise through a violent takeover, but through people simply giving up their privacy for convenience and baubles.

Big brother is watching and we all seem willing to let him do so.

Big Brother is watching you
Big Brother is watching you (Photo credit: duncan)


Enhanced by Zemanta