Tumgik
bdavis829-blog-blog · 13 years
Text
Node.js Authorization
This is a continuation of my forrst post on really basic authorization in node.js. It uses the module pattern, which is well suited for authentication since you need to hide the users data from the outside and you probably do not want outside modules affecting the functionality of this module. 
/* Setup basic authorization */ var Auth = (function(){     var users = {};     return {     addUser: function(name,pass){       var response = '';       users[name] = {             name : name,             pass : pass       };       response = 'user created';       return response;     },     authorize: function(name,pass){       var authentic = false;       for(var key in users){         if(users[key].name === name && users[key].pass === pass){           authentic = true;         }       }       return authentic;     }   }; })(); module.exports = Auth;
I realize now that this module is not asynchronous and auth.authorize should be at least. Luckily,making it asynchronous is not complicated! The authorize function would look like this...
    authorize: function(name,pass,callback){
var err = [];       if(users === {}) err.push('there are no registered users');
var authentic = false;       for(var key in users){         if(users[key].name === name && users[key].pass === pass){           authentic = true;         } else { err.push('username or password are not correct');}       }       callback(err,authentic);     }
I added in some errors so if it comes up false it passes a little more information. To make this production friendly you are going to want to save hashes of the passwords. This would make it a bit more secure.
0 notes
bdavis829-blog-blog · 13 years
Text
Podcamp Cleveland
Unfortunately, everyone reading this has missed Podcamp Cleveland for 2011. Better luck next year. Luckily everyone can follow almost everything that happened through the wonderfully backuped up internet. There were plenty of great talks on getting started with social media, and networking. 
There was a lot of discussion about Meetup.com and online events in general. I think the concensus (and please correct me if I'm wrong) was that the idea of having one place to keep all of your events online is a great idea, but Meetup does not seem to be getting it quite right. It is just a bit to expensive, just a little too outdated and not connected enough. Events online is no easy matter, and many have tried. Facebook events is the only other competitor now, and they are missing some key parts. 
In my opinion, Facebook should buy Meetup.com, combine the two solutions and they would end up with a perfect events website. 
Anyways, make sure to check out the slides from my talk, Where Retail and Online Meet.
Website: www.podcampcleveland.com
Twitter: twitter.com/podcmpcleveland
For Slides: http://www.slideshare.net/search/slideshow?searchfrom=header&q=%23PCCLV11
7 notes · View notes
bdavis829-blog-blog · 13 years
Text
Business Plans
This is mostly a comment on the discussion from 'This week in Tech' episode. (I'll get a link to it once there is a transcript on their wiki)
To really understand privacy concerns and why one business wins over the other you have to look deep into their business plans. Once you dive into this deep dark underside of the internet, it is clear how websites are clearly different. 
Google has spent years engraining itself into the entire internet. You cannot remove Google without completely changing the web, and because of this Google has a very different business plan compared to other companies that you would normally think are at the same level. Their plan is to promote the internet, quite simply, in any way they can. The theory being that the more people use the internet, the more they will use Google products, weither they know or not, and that will make them money. Google Adsense and Adwords is used on websites all over, and that is where a majority of Googles income comes from. 
Facebook's business model is also based around ads but they have a different set of features. Facebook ads take advantage of the information that Facebook has on people. Everything is secure, there is no way for someone to get personal information about a specific person, but their ads are based around the use of that info. Their business model is based around the idea that more information on their users means more money. 
Twitter has a very similar business plan to Facebook but there is a key difference in the two networks. Twitter is very clear about what is public information. Far less people are surprised their tweets are public compared to how many people are surprised their information is public on Facebook. 
It is important to remember this when trusting these companies. If you are trusting these companies with your business information, or relying on them as part of your social media strategy, you need to know the ins and outs of the web. 
0 notes
bdavis829-blog-blog · 13 years
Text
Views
I was giving a friend a quick crash course in online marketing. Wordpress + HootSuite + Google Analytics. We hit a snag about half way through the bottle (oh yeah, I forgot to mention we were drinking wine) when I was trying to explain the difference between pages and posts. It is not obvious to someone who is not in the world of blogging. So here is my best shot at getting it all to make sense. 
Every blog, content management system, and social network is set up with different types of content. Wordpress has pages and posts, Drupal has nodes, users and comments, Twitter has tweets, Facebook has updates, and profiles, Tumblr has posts. Each of these content types has different views, or ways to see the content. Twitter, for example, allows people to see tweets in a big list, but each tweet also has its own page.  Facebook has profiles with multiple tabs.
In Wordpress, posts can be viewed as just a title, the title a blurb of text, title with full text, or in a one post per page view. The first three are list views, that show the classic blog page of posts in reverse chronological order. Pages do not have these list views. They are sometimes listed in a menu or submenu but that is about it. They are also organized differently, pages have a hierarchy system, and posts have tags and categories. Using posts is generally better for search engine optimisation because they are updated more often. 
So there is a quick looks at content types. I will try to come back to this idea later because there is a lot more to content types to understand. 
0 notes
bdavis829-blog-blog · 13 years
Text
FTP/SSH clients
How a server is accessed can drastically change how we feel about it. For example, I know a lot of people who strickly use the web FTP uploader for changing files. This is probably the worst way to do it as far as speed and ease of use but they do not know how to use ftp so this is what they use. I would assume there is some security advantages to this, and it is easier to maintain from the hosting providers perspective, so that is what the host will suggest.
The point of this post is that their are great alternatives and it will change the way you think of your server. I am now using macfusion, which is one of many ftp/ssh clients that add your server as another drive on your mac. This is great, because files can now be copy and pasted as easily, if not a little slower, as when moved around the computer. One thing I like about macfusion is the user interface. It is simple, but has just enough there to get by. It also stays out of the way. I have used some others that have been good too. I used Fetch for a while, which is mac only, without any problems. I have also used Filezilla, which is great for people who are on pc and/or mac, because it runs on both. When I work on both, this is what I use just so that I am using the same interface and don't have to think about how to do things two different ways. Filezilla and macfusion are free, which also helps. I have had mixed results with paid clients. I bought Interarchy a while ago in a packaged deal over at appsumo.com (a nice site if you have never used it before. Make sure if you are not happy to email them because their are very good about making their customers happy). It definitely worked and had that Apple polish, but it felt slower than Fetch, which is what I was using at the time. I think this is because of the huge list of features, which I never used.
This brings up one of the problems with for-pay software, is that they are up against very mature open source projects that are more robust and useful simply because they have been worked on for years. Please leave a comment with your experiences with uploading files to a server. Do you use the command line with ssh? Do you love your hosts web interface for FTP?
6 notes · View notes
bdavis829-blog-blog · 13 years
Text
Node.js blog (for what it is worth)
I have been working on a blog written using node.js for a couple weeks now, and it occured to me, node.js really is not meant to be a blog. A blog can take advantage of some of its features, but sockets do not make any sense in a blog, and that is what node does well. Real time information. Blogs can be real time, look at twitter. But a blog, in the classic sense is not. It is content, and node.js is optimized for conversation. 
Most of this is opinion and could very well be wrong. I am using tumblr to host my blog, and they are definitely not used for long form writing. Tumblr is for easily interconnecting people and posts. Most of the posts are not much more than a paragraph and an image. I will admit this is probably the best way to blog, leaving long form writing for books and dieing media.
The point is node.js is great at some things and ok at others. I have fallen into this trap to, of trying to fit node.js into classic problems that have already been solved, and solved well. It is the problems that php, ruby, and java did not solve that we should be focusing on. The ones that were really a pain to get to work in php are where node.js makes things easier. 
0 notes
bdavis829-blog-blog · 13 years
Link
This particular "journey" may not involve any humans descending into the Earth, but that doesn't mean it isn't still plenty ambitious -- a pair of scientists are now proposing to drill...
0 notes
bdavis829-blog-blog · 13 years
Link
The Modern Media Agency Series is supported by IDG. With the explosion of mobile devices, advertising dollars will begin to shift to mobile for...
0 notes
bdavis829-blog-blog · 13 years
Link
One might say that AirPlay is pretty nifty for shooting content from your iOS device to your TV, but it only works with a handful of apps, and worse still, maxes out at a
0 notes
bdavis829-blog-blog · 14 years
Text
Seed of a Blog
I have been working with nodejs and the meryl framework. What better way to get started than to create a blog? It doesn't exactly have a 5 minute install, but its fun none the less. Meryl is a very lightweight framework that make for slim code. I also used mongodb and mongou drivers for nodejs. Mongou is also very simple to get started and replicates the mongodb shell as much as it can.
I'll keep you updated to my progress. 
1 note · View note
bdavis829-blog-blog · 14 years
Text
Stealing Design Tips
I have a bit of a confession to make. I steal code. Constantly. When I see a site that I like I almost always pop the hood and see whats inside. I figure, if the internet did not want me to do this they would not make it so easy to view source in any browser. I was snooping around in dribbble.com (I don't have an account, so don't ask me for an invite). Dribbble.com is a great site for looking through other peoples work, similar to ffffound.com or flickr but for graphic design. I was looking at how the have organize their front page, and more specifically, how they present their posts. The present alot of information in a small amount of space. It is also functional and pleasing. So I took a look and here is the basic idea...
<ul> <li> <label>Post Title</label> <div> Post Image </div> <ul class="innerul"> <li>views</li> <li>likes</li> <li>comments</li> </ul> </li> </ul>
.innerul li {float:left;}
Nested unordered lists! ÊIt blew my mind. It was like watching the Matrix for the first time. I'm not a html expert, so maybe this is more common that I think, but I have been using this technique ever since and it works great. I would usually create a div instead of the ul and then either span's or p tags, but this makes the code much easier to read and easier to style in my opinion. I have gone overboard on this a bit. I used this for some validation, which works, and looks great but is a bit controversial. I will explain in a minute.
<div> <label for="username">Username</label> <input id="username" type="text"/> <ul> <li class="success"> <img src="http://dl.dropbox.com/u/2450588/check.gif"/></li> <li class="fail"> <img src="http://dl.dropbox.com/u/2450588/fail.gif"/></li> </ul> <label for="password">passwordÊ</label> <input type="password" id="password"/> <ul> <li class="success"> <img src="http://dl.dropbox.com/u/2450588/check.gif"/></li> <li class="fail"> <img src="http://dl.dropbox.com/u/2450588/fail.gif"/></li> </ul> </div>
In this code, I hide the inner ul and the reveal it depending on if the input box validates. You can view this in jsfiddle here. ÊIt definitly looks good to me. The problem is that it does add some complexity to the html code. Generally speaking, it is a good idea to keep your html to only content that is visible and relavent. There are actually a couple reasons for this: 1. ÊAccessability - I am not an expert in this area, but it is my understanding that this extra code can affect screenreaders. This makes the user experience for the blind much moreÊaggravating. 2. Code cleanliness- when someone else tries to read your code, it will be confusing when their is html that is not being shown on the page. I feel this is not a big deal, and can be easilyÊremediedÊby adding comments. But those comments also adds to the size of the html file, when the alternative is one or two lines of css. I happen to like this way because I feel it makes the code more balanced. I like having an equal amount of html, css and javascript.
7 notes · View notes
bdavis829-blog-blog · 14 years
Text
CSS Display
This is the best explination of the display attribute I have ever read. http://www.quirksmode.org/css/display.html Even pros will pick up a couple hints. It is always good to go back over things you know, or at least should know. CSS standards are changing all the time and with that best practices for getting well formed html.
0 notes
bdavis829-blog-blog · 14 years
Text
Goodbye Wave
Google Wave has been an example of software before its time, and a little lop sided. The team that developed Wave spend a lot of time on the backend framework that works with XMPP and other standards, and did not develop a good front end UI. Yes, Wave had a nice looking website that showed off the possibilities of the technology, but the great parts Êwere not with the website itself but with the underlying technology. They opened up the wrong parts to developers. They should have made the entire project open source to allow developers to use the software without the front end website.
Google announced yesterday that they "don't plan on developing Wave as a standalone project." As the blog post says, they will be integrating the software into other Google projects but they will not be working on development anymore. This is a huge blow to Google, who has created this persona that they can do no wrong. Since the company started back in 1999, Google has been running at full speed into the future of the internet. From jumping on html5 videos, to making the speediest search engine, they have put all of their energy into creating the next big thing on the internet. This announcement is a big hit to that movement. Google has not had that many apps or websites that they have stopped development on. The only other project that they have completely stopped updating is Google notebook, which was a note taking application. There have been other companies, like Dodgeball, that were purchased and then taken down.
0 notes
bdavis829-blog-blog · 15 years
Video
vimeo
Beth Hoffman signing at the Hudson Library
0 notes
bdavis829-blog-blog · 15 years
Text
http://ow.ly/ibrR great article on digital nomads. Very interesting trend.
0 notes
bdavis829-blog-blog · 15 years
Text
installed #sugarcrm and I really like it. Very useful. A little to many features for my situation.
0 notes
bdavis829-blog-blog · 15 years
Text
trying out spoke.com. I'll tell you what I think. http://ow.ly/hytw
0 notes