When you create an ASP.NET MVC project it comes with a controller called AccountController that manages logging in, logging out, registering, changing password and so on. Since usernames and passwords are dead I converted it into OpenID and I’m just pasting it here for everybody to use.
I’m using the DotNetOpenAuth library which you have to download, put in your project and refer. The difference between what I’m pasting and the example provided by DotNetOpenAuth is that I’m actually storing the user in the membership database, like the original AccountController.
I’m not using any extra tables, I’m storing the OpenID identifier (the URI) in the field for the username. This has the advantage of not requiring any other fields but the disadvantage that you can have only one identifier per user. There are some unfinished parts but since you are likely to customize them anyway, I don’t feel too guilty about not finishing yet. If you find a bug, please, let me know.
This is what I would do if I were in charge of Skype, a product that could be doing much better. The big problem is, of course, adoption. Currently there are a lot of show stoppers:
You have to go to the site.
You have to download the software.
You have to install it.
You have to create an account.
You have to find and add your friend.
You have to remember to re-run it after you restart the computer.
If every obstacle halves the amount of users you are getting, Skype’s market could be 64 times bigger. That’s a lot.
I would start by writing a Flash implementation of Skype: Skype-on-the-web. Then going to skype.com/call/bob would call the Skype user bob without having to install anything or even create an account. With this feature Bob could tell his friend Sally, in an email or chatting with a competing product: “Go to skype.com/call/bob, let’s talk”. Personally, I would prefer Silverlight, but someone at Microsoft decided to halve its market by not supporting the microphone.
That’s open to abuse because anyone can call Bob at any time, anonymously. What a nightmare! That can be solved by requiring some random password, or hash. Bob would have a button on his Skype client that says “Generate call-me address” that would generate a use-once URL like skype.com/call/bob/dckx that would even work only for a short amount of time.
That last solution got a little bit too complicated. I would offer it, but I would also offer something much more intelligent. When Bob wants to talk with Sally he would go and add her to his buddy list by email address. That would automatically create an Skype account for Sally with a randomly generated password. Sally would get an email saying “Hey! You now have a Skype account! You can download Skype or just go to skype.com/on-the-web and start using it”. The most likely outcome is that Sally won’t do any of those things and will just throw that email away. That’s all right because now comes the best part.
The next time Bob calls Sally, since Sally is a non-convert yet, she’ll get an email saying: “Bob wants to talk with you! Answer him on skype.com/call/bob/dckx”. When Sally goes there, she doesn’t get a call-only-bob Skype, she gets a full featured Skype-on-the-web, automatically calling Bob. She’ll be able to call other users but what’s most important, she’ll have Bob in her buddy list. And when John does the same as Bob to call her, Sally will have Bob and John in her buddy list. Skype’s value for Sally is growing! She now has two good reasons to start using Skype
To increase the network effect hugely, I’d make it so that Bob won’t be able to see that Sally is not a Skype user. He won’t search for Sally and give up because she doesn’t have an account. He’ll just add her and it’ll seem to him that Sally is a Skype user. Because eventually she will. This model is nothing new, it’s how Paypal became the number one (only?) player in its field.
With the upcoming feature of screen sharing over Skype, tech support could also improve
Another thing I would do is target the support market. I would allow companies, like Dell, Microsoft, Apple, etc, to open corporate accounts and get the ability to have a lot of users under the same name (like “Dell Support”, “Microsoft Office Support”, “Apple iPod Support”, etc). Skype would handle all the routing and distribution of calls to each user using the typical call-center algorithms. Currently you call a local number and Dell routes you over the internet to where the call center is: India. That routing over the Internet is most likely paid by Dell. If their customers used Skype they’d be calling India directly lowering the bandwidth bill for Dell.
For the users it’s a huge win because sometimes it’s a hassle to find the right local number to call. And if you don’t speak the language of the country you’re in, or are traveling, it’s always a problem. Serving a global market globally is the way to go. After all, Skype knows which language you want to speak most of the time.
But the real jewel of this idea is this. Skype could try to discover the type of machine it is installed on and what products are installed alongside. You download Skype for MacOSX? Here’s Apple Support on your buddy list automatically. Microsoft Office installed? Either Mac or PC, here’s Microsoft Office Support on your buddy list. Running Skype on a Dell laptop? Here’s Dell support on your buddy list. The next step is letting any developer and company register a support line with Skype and enable it at install time of the application. For example: when you install Picasa, Google is added to your buddy list and, through a Skype API, Picasa has a “Call support” button that triggers Skype if locally installed or Skype-on-the-web otherwise.
Suddenly, Skype is becoming the dial tone of the internet (instead of that Twitter thingy).
“The car is not starting”, he said, “I have a theory, the tank must be empty.”. That’s not a theory! That’s a hypothesis.
A hypothesis is the first part of a theory, it’s how a theory begins and it’s what we have when we think we have an explanation for something. When we go and confirm that explanation (check the tank is actually empty), proving the hypothesis, then, we have a theory.
I’m tired of hearing the word theory when they mean hypothesis. In Start Trek they do it all the time. Captain Picard asks La Forge why the friking thing is not working and after thinking for 1.5 seconds, La Forge says: “I have a theory, maybe the…”. There are no maybes on a theory! That’s a hypothesis. I think I’ve heard the word hypothesis used correctly in Star Trek TNG twice. Somehow, my wife started to use it correctly. I’m surprised. I suppose she got tired of me shouting “that’s a hypothesis!” every time La Forge opens his mouth.
I leave you with the official definition of hypothesis:
an idea or explanation for something that is based on known facts but has not yet been proved:
Several hypotheses for global warming have been suggested.
And then we reach the conclusion that all that we talk about all the times are not theories or hypothesis, they are not formal; but somehow I’m OK with using those words informally. By the way, I’ve learned this on school. I can’t remember if it was in the last years of elementary school or on the first years of high school.
This is the first of a probably infinite series of post about my pet-peeves. Muhahaha.
A friend of mine complained that after switching to my new site (from WordPress to Plone 3) my feeds stopped containing the full article and only the body. So this is how I fix it.
Searching for how to fix it on the Internet I’ve found several articles (and I’m adding one more!):
PLONE 3 RSS: this solution fails in that it outputs the text as description and doesn’t output the description at all.In my case, the description is the start of the article, so that didn’t work. Now I’m not 100% sure that’s the case, but I think so (sorry, I won’t break my site again to check it out). This article points to another three.
Full RSS-feeds for Plone: this one adds the content in a separate tag after the description. This one is better, but pay close attention to the comment, otherwise it’ll fail.One problem I’ve had with this one is that readers show either the description or the content; they interpret description to be meta-data and it’s not shown when the content is shown. That’s probably correct, but in Plone, the description is like an introduction to the article, being shown just below the title and above the main body text, and that’s what I needed in my feeds.
Add the body text to your rss feed (2): it’s also marked as outdated, but it is the same as “Full RSS-feeds for Plone”, just more graphical and integrating the important.
So, my solution is essentially 2 or 4, with the addendum of the description to the content:
content
If you are wondering, “74” is “<” and “76” is “>”.
public class PrintClasspath {
public static void main(String[] args) {
//Get the System Classloader
ClassLoader sysClassLoader = ClassLoader.getSystemClassLoader();
//Get the URLs
URL[] urls = ((URLClassLoader)sysClassLoader).getURLs();
I decided, some years ago, to start learning Esperanto.
I went to Lernu and spent three days learning. On the third day I’ve decided to open the instant messaging system on that web site to see what was going on. I ended up chatting with someone from Russia, in Esperanto.
We talked about the usual things you talk when you only learned the language for three days. How are you? where are you from? where do you live? do you have brothers or sisters? blah blah. I was amazed I could communicate so soon. Eventually I’ve got tired and I said something like “OK, that was fun, let’s continue in English please.”
– “Mi ne parolas la anglan.” was the reply. “I don’t speak English.”
What about la hispana (Spanish)?
– “Ne”
I was talking with someone with whom I didn’t have any other common language than Esperanto. Three days before that we couldn’t have even say hi to each other.
Being able to write, build and run a Clojure application, like I explained in a previous article, is not enough. You also want to hack on it, to iterative code on it, after all, you are using a Lisp.
What I mean by iterative coding is something not very few know or do, but it’s extremely common in Lisp. You have you REPL running all the time (that is, generally, the interpreter). You load the code into the REPL, run it, modify some part of the code and re-load it. You may not reload the whole file but only a function on it, and you may have background process running on the REPL, like a web server. It is very powerful. (more…)