Najam Sikander Awan

covering web stack along with microsoft technologies

MVC3 Scaffolding Commands

| Comments

I had a freelance project that I have decided to do in MVC3 and to found following scaffolding commands very useful to get my Context, repository, controller, controller and views in PM console inside visual studio

Scaffold DbContext -Project CRS.Domain Service Concrete.CRSContext
Scaffold Repository -ModelType Attachment -DbContextType BigApp.Domain.Concrete.BigAppContext -force
Scaffold Controller -ModelType BigApp.Domain.Entities.Project -ControllerName Projects -DbContextType BigApp.Domain.Concrete.BigAppContext -Repository -NoChildItems -Force
Scaffold Controller -ModelType CRS.Domain.Entities.Service -ControllerName Services -DbContextType CRS.Domain.Concrete.CRSContext -Repository -NoChildItems -Force -Area admin
Scaffold Views -Controller Tags -ModelType BigApp.Domain.Entities.Tag

Microsoft Islamabad Meetup

| Comments

I have been invited to [Microsoft Community Meetup] at marriott hotel islamabad on Friday 19th April 2013. It was really nice experience to meet fellow devs, students and MVP.

Session was about windows 8 platform they have shown few apps that are developed in Pakistan and available for global audience. Highlight of the meetup was teams that have participated in Imagine cup and from pakistan. Team with first position showcased their project and I was blown away by their concept, presentation and business skills.

These students are from Ghulam Ishaq Khan Institute and their project is called “EPI-C” do check it out.


thanks for reading my blog.

Attended Bahria University Job Fair

| Comments

Bahria university hosted a job fair session on 19th April 2013 in which they invites companies from local industry. My company also participated in the event.

Myself and few other from our company spend whole day in the event looking for suitable events in .net, mobile development and social media positions.

All day long I have been interviewing and the answers given by students in 6th and final semesters were disappointing.

Common reason for such answers were:

  • teacher didn’t teach us good
  • course is not yet offered
  • what we have read we don’t remember at the moment
  • we are here for internship in 6 months you will teach us and than we will score good job in some other company. I don’t who told them we are here for schooling and companies will be teaching them for 6 months. Why universities are not teaching them?

After attending this I have been thinking about giving sessions to students in web development for following reasons:

  • Introduce them what industry expects form them as fresh devs.
  • Also motivate them to learn more and don’t rely on university.
  • Do small contributions in open source for learning.

In next post I will outlines topics for basic training if you are interested to contribute in this cause let me know. If you want to attend such sessions than you can contact me.

These sessions will be free and you can contribute in exercise files, topics and provide your valuable feedback.

bahria job expo

Playing With Octopress Blogging

| Comments

I first came to know about octopress from yayquery episode in which rebbeca murphy mentioned she has moved her blog form wordpress to octopress and she is very happy with that. At that time I didn’t paid any attention to this.

But today I suddenly started to play with it and I liked few things I learn along the way and that kept me going till I have imported all of my posts from wordpress to github pages.

I have read following pages form octopress documentation for configuration and blogging:

rake setup_github_pages

Next you need to do following two commands to generate site from octopress and upload it to github repo.

rake generate
rake deploy

I will have few things in mind to discover about octopress

  • q: how to customize the styles/layout?
  • q: how to make twitter work in sidebar?
  • q: how to make rake preview to work against current copy in master branch?
  • q: how to make it work against
  • q: how to get my comments against each post from discuss?

I will keep updating this post while discovering work around. I guess i will be ditching wordpress soon after finding all the answers.

Upgraded My Hosting for .net 4.0

| Comments

I have been watching Mix11 videos about mvc3 and felt pretty excited to mingle with these latest bits but I didn’t wanted to limit myself to local environment I wanted to know what efforts are required if I am developing with latest stuff one limitation I had that my host always take ages to update server so I had support for .net3.5. I email them about this thing and in reply they told me either wait 6 months or pay $8. Since I was dying to test out EF code first I paid them and within one day my hosting is all updated and now I am running my incomplete demo online :).

Deployment was a little bit scarier as my hosting doesn’t come with any publishing/deployment server but if you have vs2010 sp1 then you are in safe hands all you have to do is to click on add deployable dependencies then build your solution and upload using your favorite ftp client.

This far I like MVC3.0 , Nuget and MVC Scaffolding but I am still learning how to scaffold many to many relations or at least leverage scaffolding and then tune it to have many to many relations.

My PC Is Not Working

| Comments

I have spent so much money to build a dream PC for gaming and my web development work I was happy thought it was my investment and will recover it in future while working on it. But this never happened I worked on it successfully installed macOSX on it and then ubuntu using Virtualbox to setup my Node.JS environment but very time I need it most something bad happen. Always the worse part is not booting up and I never had any guesses where is the problem possible guesses always include ram, power supply, graphic card, processor or the Holy Motherboard in my case its always either MB or ram.

Now again when I want to use my PC its not working. Some parts are in warranty and some are not lets see what happens next as I am convincing myself to lift this more then 10kg of weight to carry to computer market for diagnosis.

Thats pretty much it. Thank you for still reading my blog.

Update to Ubuntu 11 Messed It All

| Comments

Previously I have told you about my ubuntu setup running via virtual box. I was happily working till ubuntu 11 launched and I decided to upgrade to version 11, after update vbox is not doing fullscreen worse part is compiz also not working. It seems may be driver for my ati hd 4890 not working properly.

Possible fixes that I can think includes:

$ freshly install ubuntu 11 using virtual box.
$ install ubuntu 10.10 again

If anyone knows any better solution please post.

Najam sikander awan

Back on Linux With Ubuntu Using Virtual Box

| Comments

Well for some experiments that involved git and curl I was coming across the windows problem I was trying to make my way using cygwin but after few stuck I always get stuck. Everyone’s recommended solution  was using linux OS so I have download virtual box created a virtual machine and then installed ubuntu iso 10.10 32 bit. Now as I am trying to get some softwares like chrome and vim I got few errors in package manager saying something like waiting for jockey to end. Google comes to rescue in terminal I run following commands:

ps -e | grep jockey
sudo kill process_id

Second big problem was I wanted full screen when using ubuntu solution that I found in some forum is following:

The nut of what you will be doing:

  1. Install Ubuntu on VB.
  2. After install and restart, go to the ‘Devices’ menu for VirtualBox.
  3. Select ‘Install Guest Additions’.
  4. Open Terminal in Ubuntu.

Type: cd /media/cdrom0 (this puts you to the cdrom directory where you just mounted guest additions) Press enter then type: dir (this shows you what’s inside this directory.) Press enter then type: sudo sh ./ (this is what you would type if you have an x86 machine, typical. If you have an AMD use that one, and so forth.)

  1. Wait for update to complete.
  2. Once complete, shut down Ubuntu.
  3. Restart VirtualBox
  4. Boot up Ubuntu.
  5. Once booted, press cmd+F for fullscreen or cmd+L for seamless.


Najam Sikander Awan

CSS Overflow Benefit

| Comments

I read this article and find out the power of overflow that is when you set it to a value it creates a new block formatting context in simple word that means non floated element’s content will not flow around the floated element instead will get narrower.

PS. Width should not be mentioned for non floated content so it can get narrower.