Friday, July 5, 2013

Week 6

If you're reading this blog for the first time, you might want to start from the bottom.



I'm writing after an entire week now...Been busy with things that I couldn't get time to update everything here.
All the pages have been styled uniformly(even the wordpress blog which doesn't look like wordpress at all now) And everything looks good.
And I believe phase 1 of the intern project is done. The flow of the app, without the authentication part however, seems good. Just need to incorporate authentication now, which I'll start doing next week onwards along with LinkedIn work.

Screenshots will come up soon...

Wednesday, June 26, 2013

25th & 26th June

We need a more user-friendly interaction in the web-application which persuades and convinces users to, well, use it. The current setup does not do that. First the NCR login, then the LinkedIn login, and what not.

The flow would be so much easier if the user gets automatically authenticated and then is shown some information about himself/herself. That's when the Common Auth could come in handy. Whenever you open a web page that has the Common Auth utility, it gets your credentials from your Windows account and automatically signs you in. It's currently compatible with Internet Explorer, but I'm sure there's a way to tweak it to run on our application with other browsers like Chrome and Firefox as well.

But all that had to wait. Finally, after four weeks, my own system had arrived. I didn't want it to, though, now that I was so used to Intzar sir's machine, which also had a plethora of softwares installed and bookmarks saved, and I would have to start from scratch on my own machine.

In the meantime, Naveen sir introduced Manbir and me to CVS, a type of version control system. He walked us through the basics and asked us to install some softwares, including a IDE (Eclipse) and Java, on our systems.
I had a lot more things to install on my system before I can get to these.

The system has finally been set up. I had to take a cut from 64-bit to 32-bit, but it's pretty much the same as long as programs and softwares support both. Re-installing wampserver was a pain but I managed with ease, surprisingly. Also installed and bookmarked several essential stuff, including this blog...

Sunday, June 23, 2013

24th June




I'll be resuming my work on login part today. Despite being told not to, I kept on adding tiny bits and pieces to the search page and making it better minute-by-minute. Couldn't help it, I had an inexplicable urge to perfect it.
Anyway, it's been handed over to Manbir. I have been told once again not to touch it. Getting caught working on it once more could land me in trouble, worst case.


Page prompting user to sign in using LinkedIn



Page displaying the skills in the database.



Editing Skills (Add/Remove)



Saving changes in database



21st June

I left version control systems for a while and got back to coding. Since I wasn't satisfied with Manbir's search algorithm and he was busy in something else (WordPress), I thought I'd fix it myself. Also, as per Sushil sir's ideas and instructions, I made a webpage which Prateek sir (finally!) liked.

Furthermore, Prateek sir gave a few more of his own inputs and after working on those the webpage turned out looking like this:


Primary search page


Secondary search results page

It's elegant and simple. Reminds me of Windows 8 for some reason.
Now I had to work on the login part once again, using the same 'template'. Two colors, two fonts. That's it.

Thursday, June 20, 2013

19th & 20th June

I spent all of yesterday studying version control systems and took a tutorial on Git.

Git is one of many version control systems (another being CVS).

The tutorial taught me several basic commands, but I still felt like something is missing. I just know basic commands and the idea of Git; I'm not quite sure how I'm going to implement it on Github and on my project just now.

Also, following up on Prateek sir's ideas on how the flow and layout of pages could be, I drew a flowchart algorithm describing the flow and sequence of events for first-time and non-first-time user visits to the application.

Today started with a bang. LinkedIn's developer website is not opening here, because of which all my API calls are failing, rendering my webpages nothing short of 'useless'. The LinkedIn login functionality has vanished, so there's no moving forward until it comes back. The errors while attempting to open www.developer.linkedin.com hints that NCR may have blocked the website.
We've posted an incident, hoping the issue gets fixed soon.

Meanwhile, Manbir's search page as well as algorithm needs to be refined. If I'm not doing anything else and he too is busy, might as well work on it...

Tuesday, June 18, 2013

18th June

I finally found an answer to the synchronization problem. I had posted a question on Stack Overflow's younger sibling, serverfault.com, because the query I had seemed more appropriate for that kind of forum.

My question was ridiculed and torn apart by the community, however, and I felt quite humiliated, perhaps because it was my first time in an embarrassing situation online. The question was even closed due to being off topic, but I got the answer I needed nonetheless.

Version/Revision/Source Control Systems (VCS).

Now I'm supposed to study a bit of theory. I don't mind it, since I'm going to 'apply what I learn' soon.


In other news, forget letting Manbir access my system, I'm not even able to access his files right now because his wampserver isn't functioning properly. Stay tuned for more on this!

17th June

I incorporated some beautiful and web-friendly Google Web Fonts in my code today, and it seems to be working fine.

I'm still having trouble sharing my database with Manbir; access issues.

Problem Statement:

Find a way to synchronize your code in both systems (Manbir's and mine), so that we are simultaneously working on the same code but on our own. It would all be compiled later on the staging server.

Problems that might occur:

  • Overwrite issues, since we're reading and writing the same file.
  • Loss of project data on all systems working on it, if the PC acting as the sever crashes.
  • PC deployed as server must be on for other systems to access the files.

Apart from that, I was really itching to code, even though it was not the agenda. So I continued debugging and adding more features to web page I was working on, and also managed to find a less 'जुगाड़ू ' way around it. Now the CSS works even when it's included in the head section of the document.
Also, I've had quite a bit of headway in making the page for non-first-time users, where they can view and edit there already-stored skills in the database. Still, I've got lots of brushing up to do on that front, including the feature of removing skills from the database, as well as fixing that 'auto_increment' issue that is for my own personal understanding, so I won't dwell on it any further in this blog at least...


Friday, June 14, 2013

14th June

As expected, today was indeed my weekly evaluation. I showed them the improved version of the page and made Prateek sir log in via his LinkedIn account and add his skills to the database. It worked. He liked it, at least the functioning of it (There's a long way till it comes out looking like something he'd love and endorse).
Nevertheless it was nice to see a smile on his face. Once again, signs of progress are showing. According to them, I had little or no knowledge of coding when I first stepped into this office, which is not entirely true. But I'll go with it because I know much more of it now.


First page (Still in alpha stage)

Skills being displayed for the user

Now that I'm not the only intern working on this project (Enter Manbir Cheema- MCA , Thapar University), all the code related to it has to be synchronized  between both our systems. Kind of like, we will be simultaneously reading and writing the files.
Also, a staging server needs to be set up for testing and revising the web pages before they can go live.
Also, I need to bring Manbir up to date with all the work I've done so far, and make sure all the necessary software to run my webpages has been installed in his system as well.

All this might sound boring from a third person's perspective, but you can't argue that some of the posts are very well written, and subtly informative to some!

This concludes week 3. There's still a long way to go, however...


A moment to stop and think

One of my professors in college told me that doing an internship this summer won't do me any good. She would say, "Look at your paper, you've only lost marks in theory. During a job interview you'll be asked theory only. Nobody will see whether or not you can write code. Jabtak aapko peheli cheez nahi aati, doosri cheez kaise karogey? Aagey kaise badhogey?"
The truth is, I only lost marks because I didn't study at all. And there's no way I could read books full of concepts and theory all summer. I wasn't feeling too good about the prospect of Computer Science and Engineering either, I was scared that maybe I made a big mistake by opting for it. That is, until I got a slight glimpse of what all I can do with such knowledge, when two of my friends and I worked on a database project last semester. We made something like a search engine. It was refreshing, finally applying what you've learnt, rather than learn more and do nothing with it. That is exactly what I'm doing this summer- Applying my knowledge in the real world, and actually making my contribution count. And that's why I believe that I've learnt more in 3 weeks here than I've done mugging up definitions and writing useless SML and Prolog code snippets in during my 2 years in college...


Look at all those skills! Didn't get them from just reading books, I assure you.

Wednesday, June 12, 2013

13th June

As per the previous post, I had done till part 3) of the problem discussed.

However, I had started experiencing unexpected problems from part 1) itself.
The page wasn't functioning correctly. The user gets authenticated, his/her skills are extracted from LinkedIn and dispayed on the page with options to edit(check/uncheck so far. Planning to incorporate an 'Add More' button)  and submit them. But as soon as the page finishes loading, the CSS would disappear. I know for sure it has got something to do with the API's. I found a way around it. It turns out that the script overrides the CSS settings and displays basic HTML. So instead, I made the script write the CSS file call onto the body of the document, using document.write(). In hindi, such a fix is called  'जुगाड़'! 
Also, when I had made the dummy skills page earlier(you would know if you're following the blog correctly), I had already written the PHP code for storing the selected skills in the database. So I used the same code, barring a few modifications such as table definitions and variables, to store the data. I was modifying it run perfectly earlier in the day. I've defined the database tables now-
  • User, consisting of the user's id (auto-incremented), his first and last names, and his LinkedIn profile URL.
  • Skill, consisting of the skill's id (auto-incremented), and the skill name.
  • user_skills, consisting of the combination of user and skill id's which determines which skills are related to a particular user.
I ran the simulation on different systems, and it seemed to be running fine, but I won't guarantee the database's reliability yet.

My next step would be to make a separate page that lets users (who are NOT visiting the web page for the first time) view their stored skills and add/remove them as per their wish.

The web page requires lots of tuning on the display front. It shows how much I still have to master CSS.

Sushil sir introduced me to loads of new fonts made available through Google Fonts API
They don't work, however. Some settings need to be changed on the server, which I won't be doing any time soon.

Tomorrow is progress evaluation day, I think, like Friday. I hope I haven't made any huge error or mistake for which i might be scolded. No guitars for tomorrow, though, since I didn't receive any song suggestions from my fellow colleagues.
Nonetheless, I personally think I've made great progress under my mentors here at NCR. 

12th June

I was having some trouble coding the predictive skills page using peopleSearch(). Besides, I was reaching the throttle limit way too often.

Hence, I decided to start working on a user-authenticated skills page.
The idea is simple-

  1. The user opens the page.
  2. He/she authenticates by signing in with LinkedIn.
  3. The page makes a call to the IN.Profile() API that returns the data of the user (including skills).
  4. The dummy page is presented with the skills, along with an option to add more.
  5. The selected skills can now submitted to update the database.

I've done till part 3 as of 12:47 on my clock. I should be able to do the rest without any major difficulty, having already done something similar last week.

Week 3 - 11th June

I might have overdone the page testing with the API key. The page is refusing to make any more calls to the IN.peopleSearch() API now.
It happened yesterday as well, but got fixed on its own this morning. This led me to believe that there is some sort of daily limit on how often you can use LinkedIn's API features.
I researched a bit online, and found out, that there is a throttle limit on every API key, used to ensure the best experience for all users.

At least I'll be more cautious with the testing now onwards.
Well, owing to this limit, I've been able to get back up to date with regards to blogging!

Also, I found a way to increase the throttle limit. There are a total of 100000 calls allowed. And each unique user is allowed a small fraction of this everyday(Say 100). I'm using my mom's LinkedIn Id as well now for the testing, which has helped me double the limit of calls I can make on the APIs!

Week 3 - 10th June

The idea was to create a web application, that authenticates users automatically through NCR's own Common Authentication application. During authentication, the user's first name and last name would be extracted and used in calling the LinkedIN API peopleSearch(). The matched first and last name strings that work for NCR (assuming and hoping, that the combination of first and last name is unique for each employee) would be returned and processed as per need.

Road-block: A road-block was encountered in the form of realization that, 'skills' is a full profile field which, unlike basic profile fields, cannot be accessed by unauthenticated LinkedIn users. Moreover, there has to be an authenticated user for the API to even run. Technicality aside, we're unable to fetch and store the skills of  employees without them doing it themselves.

New Objective: Create a predictive dummy skills page, that displays a tentative list of skills for a particular employee, on the basis of his/her LinkedIn basic profile fields like headline, summary, specialties.



*Point to note: Keep front end and back end as detached as possible, so as to incorporate the possibility of interchangeable layout and design of the webpage.
*Programming languages familiarized with so far: HTML, CSS, JavaScript, jQuery, PHP, MySQL.

Tuesday, June 11, 2013

Week 2 - 7th June

Project Progress Presentation today.


  • Dummy page was shown and simulated in front of Prateek Sir. He didn't like the layout and design.
  • Started working on webpage with LinkedIn's REST APIs.

Week 2 - 6th June

Introduced to LinkedIn API's, which would be used to predict and display the skills an employee possesses, rather than him/her manually entering each one.

  • Visited the LinkedIn developers website, to study REST and JavaScript APIs and get an API key.
  • Started getting familiar with the APIs and how they're used.
  • Learnt more JavaScript, since its knowledge would be required in abundance.

Week 2 - 3rd June to 5th June

Problem Statement :
Make a dummy webpage displaying certain hard-coded skills, and make the user(whose username has been extracted from a previous log in page) select various skills and submit them. Store the data in a database.

Hard Target : 5-Jun-2013
Soft Target : 7-Jun-2013


  1. Install Apache, MySQL
  2. Learn PHP
  3. Make dummy skills page
  4. Create database tables
Status:

Completed successfully at 1500 hrs, 5-Jun-2013.
  • Installed Wampserver(Apache, PHP, MySQL) and defined the tables in the database.
  • Learn enough PHP to do the necessary form processing and data manipulation, including interaction with the MySQL server.

Week 1

Pardon me for not being in sync with the current date, but I've ben running late, and will catch up soon.

Spent my first week learning HTML, CSS and jQuery, and made a basic webpage without any useful functionality. Tried my hand at JavaScript too, but the tutorial was too boring and uninformative. So i left it, until it was absolutely essential to have an understanding of JavaScript to move forward in the project.


Project Overview

27th May '13,

I was given a brief idea of the project that was to lie ahead.

The objective of this project is to create NCR Corporation's very own exclusive 'employee skills' database and to create a web application that indirectly allows the employees to access it - by adding and updating their skills, and by searching for specific co-workers on the basis of their skills. This would require a fair understanding of client-side and sever-side languages such as HTML, JavaScript and PHP, none of which I knew as of Day 1.
Also, we would be taking much help from the REST APIs available from developer.linkedin.com, LinkedIn's developer website.