Friday, October 5, 2012

How to get market your product

A good product would be used because it is good

I have seen a lot of advertisement about products that don't function correctly and I quit them so early. I am a gamer and I have to wash my eyes after looking at the Facebook ads. There is no way I am giving your Facebook game a chance. I played mafia wars and I already know what those free to play games are. If you want to get a good following then spend the money on improving the product or the model you are using. I have used many products that were reccomended to me by my friend. I have used dropbox for one reason. It is awesome. It solves a problem and I will share my dropbox with my friends. Not because it is good, but because I care about my friends and I want them to use a good. WE WANT TO USE YOUR PRODUCTS BECAUSE THEY ARE GOOD.
Monday, September 24, 2012

Reading Information from a webconfig file in

Every once in a while, we would like to keep some of the application settings in a web config file to handle tasks like Database location and file location. Here is a quick way too read from a Web.config file  

<!-- Somewhere in the web.config fole -->
    <add key="NameOfTheKey" value="Value"/>
    <add key="FooKey" value="\\folder\Shared Documents"/>

Here is how to get the file in C#

string location = WebConfigurationManager.AppSettings["NameOfTheKey"]; //location will be "Value"

Hope that helps

A Web Afternoon - Notes

I went to a (surprisingly) fun event last weekend. The best way to describe it is it is a series of TED videos all talking about the web (with great cake and coffee in the back of the room).  Hopefully, you can follow these amazing speakers and get caught up on what you missed. I highly recommend going to the future A Web Afternoon events.

below are some of the quotes that I was able to doodle down (I really have no idea how to summarize this). I am sorry if I am misrepresenting any of the sessions or misquoting anyone.

Speaker: Jensen Inman
Contact: @edae
Topic:Be Awesome
"if you find yourself smiling and excited about what you are talking about then that is the thing you should do"
"Compare shoes.. if you are all wearing the same shoes then you are hanging out with the same people"
Speaker: Igor
Topic: Yap Story - story of a start up
David vs gollaiath.
"to keep up, you will find yourself spending 8 hours to keep up, and 8 hours to surpress"
Koala bottle (using a cute descriptive name can help)
yoko onno apple in the art exhibit
Speaker: Todd Moy
Contact: @toddmoy
Topic: ..magic
"I can't do magic, I can help you see it"
user experience is the intercention between the user's mental model and interaction and the Designer's system.
-A  Beautiful Lie:
"fiiction can be more compelling than truth"
Turbo tax and the "analysing your taxis status loading bar"
Gmail "recall" feature delaying the email for a couple of seconds.
- Slight of hand
"work while they are distracted"
red paper heart (I don't remember why I wrote that)

Speaker: Doc Waller
Contact: :@docWaller
Topic: The power of words
I am having a hard time writing about this session. It was mind blowing and made me think about a lot of stuff. I found myself day dreaming and relating to every word.
"Transparency is sexy"
"Less ____ More Layman"

"Pinocchio had a rock bottom"
"Power words vs word with power"
"The Champ is here"

Speaker: Josh yolkert
Contact: @Skookum
Topic: Destruction
build -> fix -> integrate
"We are ____ shop" will die

I think I will stop here for now. I have 4 more pages of notes and it is getting really late
More info could be found here.

Razor Helpers

Razor helpers work just like functions in C# and JS. Create a function (and pass parameters to it if needed) and call it to draw the HTML.

@helper ShowName(string Name)
          <p> hello @Name <p>

and then to use it


The HTML will transplate to
<p> hello Ammar <p>
<p> hello Mike<p>

The output will show:
Hello Ammar
Hello Mike
Saturday, September 1, 2012

CSS quick cheat sheet/tutorial

I think it is about time I start building a cheat sheet for myself. Here is a CSS one to cover up all the basics.

How to use a CSS from another file:
<link rel="stylesheet" type="text/css" href="mystyle.css" />

Elements and definition
h1 { Color: BLUE; fontsize:12px;}

/*This is how you comment*/

how to apply the style:
in the html line, use style="Color:Blue"

how to write a CSS
font-Size: 24px;

how write a CSS to apply it to what
. means  class selector for multiple elements  e.g. .RegisterElements. Or you can get p.RegisterElements

# means selects an id  e.g.  id="item"
Wednesday, June 6, 2012

Validation for MVC Razor view

I got stuck with creating the validation for the MVC project and I couldn't find many resources.

There are three steps needed to implement validation in the MVC project:
1. Attribute on the variables
2. HTTP helpers Validation summery and messages on the view
3. Javascript  and Jquery libraries

Here is how you implement the validation
1.Attribute on the variables
They are placed on top of the variables stating the limitations on the variables (e.g. has to be a number, too long or short, can't be null..etc).
Here is an example that I used for a variable that can not be over 1024 and is also required.
        [Required(ErrorMessage="Value is Required")]
        [StringLength(maximumLength: 1024, ErrorMessage = "too long")]
        public string DialogueSubject { get; set; }

make sure you include using System.ComponentModel.DataAnnotations;

2.HTTP helpers Validation summery and messages on the view
These lines would fire up once a validation error shows up.
At the top of the form I placed the following
    @Html.ValidationSummary(true, "Error. See the notification below")
and after each one of the textboxes I placed this line. It would get the error from the attribute and tell the user which rule was violated.
    @Html.ValidationMessageFor(m => m.DialogueSubject)

3.Javascript  and Jquery libraries
And this was the part that I was stuck on. I didn't include the Jquery libraries. These are the 2 libraries that need to be included:

This is what the final result would look like:

And that is it! happy validation

I need to blog more

I need to blog more I need to blog more I need to blog more I need to blog more I need to blog more I need to blog more I need to blog more I need to blog more I need to blog more I need to blog more I need to blog more I need to blog more I need to blog more I need to blog more

It has been a while now. I need to clean up all of the drafts I made.
Saturday, January 21, 2012

College for the Non-Traditional Students and it's benefits

I will try to rush this write up as I feel like there is much to discuss and edit. and..GO

I was listening to NPR on my way home from work and they were talking about bringing back college drop outs to the classes. The part that interested me was when they talking about how the current college model does not cater to the current college student now. Many college students commute or  work while attending college unlike what universities (and societies) expects the average student to be (living in the dorm and having no other responsibilities aside from school work). Many of these (new aged) students will have to choose between work or school. On of the options will put food on the table so it is easy to drop out of school. I am hoping that this will change in the future with the introduction of the internet and online classes. Here are my reason on why non traditional students will can have a better education:

1. An early work force experience.
Sure, There is no trade of for the crazy social life in school with all of its highs and lows. But there is no trade off for the work force experience either. Having a job or two on the resume will mean a lot especially if the job is related to your dream future job that you are applying for.

2. being your own teacher.
Online classes demand a lot of self-taught skills. It could feel like cheating sometimes by attending a class and trying to find what the teacher assumes is going to be on the test over learning the actual material. I knew students who did not read the book and never heard of a UML diagram before even that it was on the 2nd chapter in a book for a 1st year Computer Science class. Teachers can not go over everything in the 45 min class time so they will only try to pick what they want the student to pass knowing.

3. Time management skills.
 If you work and attend school at the same time, then you will force yourself to get the best out of your study time and develop good study skills.

 The model of college education is outdated and it will be long before it become effective to all students. But I also think that those who are not in the target could benefit a lot more if they can survive their way through.

 I just hope that it helps some internet surfer looking for opinions.