I'm going to keep this post short, but I'd like to describe something I've noticed, about myself.
Every time I go to work, I feel good. I don't feel exactly motivated, but I feel like I can deal with whatever that comes my way. After about 4 or 5 non-consecutive hours of programming, my brain just isn't that good anymore. My coding standard degrades, and I take longer to understand things that would've been simpler earlier in the morning.
No doubt, I continue to work, as slow as my progress becomes. And then, at the end of the day, my brain feels white. In Mandarin I would say 一片空白. I'm not sure why this happens, but I think it's quite cool :) and at that point of time in the evening, I perfectly hate coding. 那时我就对coding反感.
Showing posts with label IT. Show all posts
Showing posts with label IT. Show all posts
Saturday, 11 February 2012
Saturday, 4 February 2012
Entity Framework
With the beta version of Entity Framework 4.3 already in play, we can expect more fabulous things from Microsoft. If you haven't heard about Microsoft's Entity Framework, then it's probably alright. I sincerely mean it, even if you are a C# developer who manipulates objects controlled by the database.
The Entity Framework comes in three awesome flavours, namely Database-First, Model-First, and Code-First. I've never experimented with Model-First, but I've dabbled with the Database-First and Code-First types. Having said that, I wouldn't say I'm a pro at Entity Framework, because there are just so many things to consider when using the Entity Framework. A few of them would be...
The three most important keywords in a LINQ query would probably be from, where and select. Probably a little different from the usual SQL syntax, but that's how LINQ works (I think it was formatted this way because of how IntelliSense functions). There is another way to write LINQ queries though, and I find this way classier.
Having said all that, I wouldn't say that EF is a fabulously beautiful concept. Old school SQL queries are, in my opinion, still good to use. There are some things that I dislike, though—one of which would be WCF Data Services being more accessible to EF. I mean, WCF is good and all, but why limit its functionality? I might not be right, but I have a hunch that this is Microsoft's way of pushing Entity Framework, to see that they achieve a remarkable ROI from the hard work they've put in for EF.
Anyway, good night to you. We are all human in the eyes of God (if there is a God), all entities from the perspective of a database, and all gold mines to Micro$oft.
The Entity Framework comes in three awesome flavours, namely Database-First, Model-First, and Code-First. I've never experimented with Model-First, but I've dabbled with the Database-First and Code-First types. Having said that, I wouldn't say I'm a pro at Entity Framework, because there are just so many things to consider when using the Entity Framework. A few of them would be...
- Concurrency. There's just this evil exception known as the OptimisticConcurrencyException. Eat that, optimists.
- Performance. Believe it or not, I've read that Entity Framework performance is far worse than running basic SQL queries. One can precompile his queries, and cache his results, but I'm nowhere near that level as of yet.
- Flattening. This has less to do with EF, and more to do do with LINQ. Because we usually manipulate the results of Entity Framework using LINQ queries, problems can crop up when you're using Anonymous Types... Believe me, I've been there, and done that.
These are probably obstacles that a pro would never face. Having said that, let's have a quick run-through of the three awesome flavours of EF that Microsoft has to offer:
- Database-First. As the name implies, you start off by defining your database schema and creating your respective tables using SQL Server. After that, you generate a .edmx file automatically using Visual Studio's Entity Data Model wizard.
- Model-First. No database, no code (no guarantee either, because I have not tried this). You use the visual designer to define your models, with their respective properties, and the Framework helps you by generating the code and database.
- Code-First. Write your own classes, create a DbContext class, and dump all your classes into it in the form of DbSets. When you first use your DbContext, EF automatically generates the database for you.
I must admit that the names can be a little confusing at first glance. Looking at it from another perspective, the equivalent of entity would probably be object. The three flavours only differ in the way you define these entities: whether you create them as database tables, draw them out using a given tool, or approach the code straight on. They all work, just that you will have more control on the approach in which you take.
Let's then approach LINQ. Take for example, you have a list of entities (equivalent of a table in a database) known as Employees. In code, you would probably approach it this way when you wish to retrieve a certain portion of them:
Let's then approach LINQ. Take for example, you have a list of entities (equivalent of a table in a database) known as Employees. In code, you would probably approach it this way when you wish to retrieve a certain portion of them:
var selectedEmployees = from e in db.Employees
where e.Selected == true
select e;
You would concur that it's classier, wouldn't you? ;) These expressions also allow you to access a wide variety of methods (e.g. .Where(), .SingleOrDefault(), etc.), and personally I think it looks neater!
var selectedEmployees = db.Employees
.Select(e => e.Selected == true);
Having said all that, I wouldn't say that EF is a fabulously beautiful concept. Old school SQL queries are, in my opinion, still good to use. There are some things that I dislike, though—one of which would be WCF Data Services being more accessible to EF. I mean, WCF is good and all, but why limit its functionality? I might not be right, but I have a hunch that this is Microsoft's way of pushing Entity Framework, to see that they achieve a remarkable ROI from the hard work they've put in for EF.
Anyway, good night to you. We are all human in the eyes of God (if there is a God), all entities from the perspective of a database, and all gold mines to Micro$oft.
Friday, 9 December 2011
Thoughts on IT
I went for my first interview yesterday. It was with Microsoft.
OK, I wouldn't say it's really my first, because I've had interviews before this. None of them, however, was about a complete evaluation of me—in other words, those interviews were nothing more than formalities. In this case, however, I had my qualifications looked at, I was observed, interrogated, and came out thoroughly disheartened.
It was an interview for an internship position, anyway. A position that went along the lines of developing proof-of-concepts for both aZaaS and Microsoft (in other words, whatever that I was going to work on was a shared project between aZaaS and Microsoft).
My main flaw of the entire interview, was, perhaps, being a little too humble (on hindsight), and also not being able to show my drive and willingness to go the extra mile. To be honest, I'm not exactly the very self-motivated, passionate-about-IT kind of student. I'm more of the, "I know you know I'm good", "We'll see with time" kind of person. I don't know. It's probably got to do with my personality rather than anything else.
Knowledge-wise, I believe I portrayed myself as a person who has a sound knowledge of whatever I've studied before. On the other hand, one of the interviewers' (there were two: a male and a female) questions stumped me. "What do you look forward to when you wake up every morning?" God, hath you forsaken me? I know not the answer to this question!
The male interviewer was the one who spoke the most, and he mentioned that he was working as a janitor. Someone who cleans stuff, stacks up chair... yeah, a janitor being an interviewer?! My frigging ass! I could only look at him in disbelief, thinking about what he could really mean. I think I must have looked really dumb there... So the interview gradually developed into a casual conversation that went along the lines of this... I can't remember the interview word for word, but, here goes:
He: So what do you look forward to when you wake up every morning?
Me: *speechless for awhile* Um, I think I'll need some time to think about it.
He: *smiles* By some time do you mean a few minutes, or a few years?
(I never came up with the answer in the end. Later...)
He: What do you know about ASP.NET?
Me: *ramble about GET, POST, Toolbox stuff, and Entity Framework* I used the database-first approach (referring to Entity Framework).
He: So what's the advantage of using the database-first approach?Me: Erm, I wouldn't say that there's really an advantage of a database-first approach, it's just the one I used when I developed it for the assignment. In the code-first approach, you write the classes first, but in the database-first approach you make the tables first. I guess the only difference is that you have control of the one you start doing first.
He: You know, during the first 5 minutes of the interview, you came across as a bo-chap person. But right now you show that you actually have knowledge of what you're doing.
Me: *feel proud inside*
He: What's stopping you from just going out there and making it big?
Me: Well, I don't really feel like I can make anything tangible. You know, when I was in secondary school, I picked up this book on C++; I'm not too sure whether C# was around at that time.
He: Yes, it was. I'm 10 years older than you.
Me: Oh, OK. Erm... yeah, and anyway, I learnt how to like assign an integer and stuff, but I never saw how I could make something tangible. I mean, even in school, we do assignments and make something out of it, but I never see any of them go into the market.
He: *something alone the lines of But you've never really tried, have you? How would you know?*
So yeah, it went something along the lines of that. I don't think I impressed either of them at the very least, but at the end of the day I hope I get the job! It might really be the "play hard-to-get" kind of thing that people in relationships do, just to tease us internship interviewees, but... I don't know! To cut it short, it was a very unnerving experience. At the same time, it was eye-opening; I learnt a lot from it.
On the other hand, my friend (who went in before me) portrayed himself as a true blue leader, a person who is very motivated and driven, willing to learn... But the questions the male interviewer posed (once again) shook him. Questions such as "what is the difference between mutable and transmutable?", "what is an interface?", and "what is the fundamental difference between C# and Java?" I could probably talk some crap about the first two questions, but maybe not so for the third. I guess, I'm not really experienced at Java.
Overall, I'm glad that I came across naturally, and I tried my first real interview with who I really am; I did not, in any way, try to portray a false persona! this is one thing I'm really happy about. On the other hand, I have no idea if I'd get the job... oh well! Good luck to me.
OK, I wouldn't say it's really my first, because I've had interviews before this. None of them, however, was about a complete evaluation of me—in other words, those interviews were nothing more than formalities. In this case, however, I had my qualifications looked at, I was observed, interrogated, and came out thoroughly disheartened.
It was an interview for an internship position, anyway. A position that went along the lines of developing proof-of-concepts for both aZaaS and Microsoft (in other words, whatever that I was going to work on was a shared project between aZaaS and Microsoft).
My main flaw of the entire interview, was, perhaps, being a little too humble (on hindsight), and also not being able to show my drive and willingness to go the extra mile. To be honest, I'm not exactly the very self-motivated, passionate-about-IT kind of student. I'm more of the, "I know you know I'm good", "We'll see with time" kind of person. I don't know. It's probably got to do with my personality rather than anything else.
Knowledge-wise, I believe I portrayed myself as a person who has a sound knowledge of whatever I've studied before. On the other hand, one of the interviewers' (there were two: a male and a female) questions stumped me. "What do you look forward to when you wake up every morning?" God, hath you forsaken me? I know not the answer to this question!
The male interviewer was the one who spoke the most, and he mentioned that he was working as a janitor. Someone who cleans stuff, stacks up chair... yeah, a janitor being an interviewer?! My frigging ass! I could only look at him in disbelief, thinking about what he could really mean. I think I must have looked really dumb there... So the interview gradually developed into a casual conversation that went along the lines of this... I can't remember the interview word for word, but, here goes:
He: So what do you look forward to when you wake up every morning?
Me: *speechless for awhile* Um, I think I'll need some time to think about it.
He: *smiles* By some time do you mean a few minutes, or a few years?
(I never came up with the answer in the end. Later...)
He: What do you know about ASP.NET?
Me: *ramble about GET, POST, Toolbox stuff, and Entity Framework* I used the database-first approach (referring to Entity Framework).
He: So what's the advantage of using the database-first approach?Me: Erm, I wouldn't say that there's really an advantage of a database-first approach, it's just the one I used when I developed it for the assignment. In the code-first approach, you write the classes first, but in the database-first approach you make the tables first. I guess the only difference is that you have control of the one you start doing first.
He: You know, during the first 5 minutes of the interview, you came across as a bo-chap person. But right now you show that you actually have knowledge of what you're doing.
Me: *feel proud inside*
He: What's stopping you from just going out there and making it big?
Me: Well, I don't really feel like I can make anything tangible. You know, when I was in secondary school, I picked up this book on C++; I'm not too sure whether C# was around at that time.
He: Yes, it was. I'm 10 years older than you.
Me: Oh, OK. Erm... yeah, and anyway, I learnt how to like assign an integer and stuff, but I never saw how I could make something tangible. I mean, even in school, we do assignments and make something out of it, but I never see any of them go into the market.
He: *something alone the lines of But you've never really tried, have you? How would you know?*
So yeah, it went something along the lines of that. I don't think I impressed either of them at the very least, but at the end of the day I hope I get the job! It might really be the "play hard-to-get" kind of thing that people in relationships do, just to tease us internship interviewees, but... I don't know! To cut it short, it was a very unnerving experience. At the same time, it was eye-opening; I learnt a lot from it.
On the other hand, my friend (who went in before me) portrayed himself as a true blue leader, a person who is very motivated and driven, willing to learn... But the questions the male interviewer posed (once again) shook him. Questions such as "what is the difference between mutable and transmutable?", "what is an interface?", and "what is the fundamental difference between C# and Java?" I could probably talk some crap about the first two questions, but maybe not so for the third. I guess, I'm not really experienced at Java.
Overall, I'm glad that I came across naturally, and I tried my first real interview with who I really am; I did not, in any way, try to portray a false persona! this is one thing I'm really happy about. On the other hand, I have no idea if I'd get the job... oh well! Good luck to me.
Saturday, 8 October 2011
Freelancer.com
While having a nice sweet walk (or surf, if you wish) around the interwebs, I chanced upon this extraordinary website.
While I already know that freelancing is a pretty common thing (perhaps not so in my country), I've never thought that such a website would exist! A website which allows freelancers and paying parties alike to come together and find each other: in economics this would be the reduction of frictional unemployment. Or maybe not.
Anyway, I got a shock when I took a look at what other people are paying. Fifty bucks for a C# task to be completed in a day or two. Fifty measly, mediocre dollars. Being a student of C# myself (and I probably don't know any other language well enough to do a proper job), I was a bit confused for a moment or two. My prospects for the future if I continued in this IT industry... they suddenly looked pretty dim. I wouldn't want to go to work at the office, type code all day long till my head is about to explode, and then bring back home a pathetic grand and a half!
However, with the supply of IT professionals being so abundant (what with people from India, Russia, places I've never heard of), prices are sure to be driven down low. This would be especially so if companies were to take a broader stance and look beyond their own countries, and outsouce from freelancers from all over the globe. Maybe not so in Singapore, perhaps--I believe our culture is still much too conservative and not so risk-taking. Indeed, outsourcing from people you don't know poses a large potential risk... how if? the person fails to deliver?
Still, such websites are very disheartening to a soon-to-be young adult such as me. Take a look at this list: 25 whopping websites to find your dear freelancer... this is, this is, certainly not the direction I want this world to take. So many people offering to do professional jobs for half the money I'd like to do them for! Malevolent job stealers! Voleurs! Je deteste vous tous! Putains!
Let me enjoy this lifetime, oh dear God, and not thrust me into the depths of apocalypse.
Anyway, I got a shock when I took a look at what other people are paying. Fifty bucks for a C# task to be completed in a day or two. Fifty measly, mediocre dollars. Being a student of C# myself (and I probably don't know any other language well enough to do a proper job), I was a bit confused for a moment or two. My prospects for the future if I continued in this IT industry... they suddenly looked pretty dim. I wouldn't want to go to work at the office, type code all day long till my head is about to explode, and then bring back home a pathetic grand and a half!
However, with the supply of IT professionals being so abundant (what with people from India, Russia, places I've never heard of), prices are sure to be driven down low. This would be especially so if companies were to take a broader stance and look beyond their own countries, and outsouce from freelancers from all over the globe. Maybe not so in Singapore, perhaps--I believe our culture is still much too conservative and not so risk-taking. Indeed, outsourcing from people you don't know poses a large potential risk... how if? the person fails to deliver?
Still, such websites are very disheartening to a soon-to-be young adult such as me. Take a look at this list: 25 whopping websites to find your dear freelancer... this is, this is, certainly not the direction I want this world to take. So many people offering to do professional jobs for half the money I'd like to do them for! Malevolent job stealers! Voleurs! Je deteste vous tous! Putains!
Let me enjoy this lifetime, oh dear God, and not thrust me into the depths of apocalypse.
Thursday, 6 October 2011
The passing of Steve Jobs
Wow, a young Steve Jobs does look charming!
Hey there, nice day to you. Steve Jobs passed away yesterday, on Wednesday, 5th October 2011. It came as kinda abrupt news to me as while I knew that he stepped down as CEO of Apple due to health concerns and such, I never knew his death was nearing. His passing came as a surprise to me, and sadness, dismay, to many others all over the world.
Yup, I never really did feel anything much towards his passing. To me, it was more like an event, an occurrence, much like any other normal incident. I don't have any Apple product with me. Nor am I dabbling in any Apple-related app programming of some sort. I've taken a look at Objective-C, and I'd say it's even more confusing and baffling than C++. Maybe I'm just not that good a programmer. ;)
I got the news of his death from my friend. And then... he kind of explained why his death was such a big thing. It was particularly because his company, Apple, has been producing cutting-edge, high-end products, that are not only high in demand, but also fetch high prices--the iPod, iPhone, iPad, MacBook, among many... wait, I can't really think of any other products here, but let's just say many others for now.
My friend explained to me that, without Steve Jobs, the following probably wouldn't have happened:
- the advent of smartphones
- the advent of tablets
- the evolution of laptops (ultraportables, anyone?)
It is true, indeed, that Apple has been The One in recent years to constantly pioneer new technologies, new ideas, and new products. Much like a razor wind cutting through uncharted territory, Apple has been stepping into places never explored before, revolutionizing and innovating, and with constant success. I would admit to all of these. However, I'm not too keen on Apple products altogether. Why? For one, I find their products grossly overpriced. I'm still a pathetic student living off his parents, you know! I can't possibly afford the iPhones... that... about a quarter of my classmates have. For another, I find that once Apple produces something good, other companies jump on the bandwagon quickly after and come up with similar products that are reasonably satisfying. On top of that, I can be the unique kid on the block, the one with a different, snazzy, Motorola Flipout. ;)
I've been rambling quite a bit on why I don't really care too much about Apple products. At the end of the day, I recognise that Apple is a great company... much like Microsoft in older times, however constantly staying ahead of the game. Apple has this oomph! that other companies don't have. I also read an article somewhere (I think it was TIMES, they have this cool mobile app for Android; you can go check it out!) about how Apple's success can be largely attributed to its streamlined and consolidated business. I mean, you can't find any other corporation out there who has a store created by themselves, a phone created by themselves, a laptop created by themselves, OSes (be it the Mac OS or iOS) developed entirely by themselves, complementary apps (iTunes, App Store) all by themselves, customer service fully supported by themselves...
Every other IT company isn't like that. I mean, let's take a look at Microsoft. Yes, they develop OSes for computers and mobile phones, but do they make the computers and mobile phones? Nope! How about Samsung? the new kid on the block who's been producing some cool notebooks and netbooks lately. Oh, they do produce great products... television sets, notebooks, audio players, but do they develop OSes? I doubt it. Having said that, I'd admit it's quite a feat to have a company like Apple, because to excel at every aspect of your business, from production to development to support-side to retail to customer service, that, requires some Apple magic in itself.
I've been talking about Apple, Apple, Apple, with no mention of Steve Jobs at all. Why's that so? Well... I guess it's because I don't know him personally. I bet the millions, probably billions, of other people talking and blogging about him don't know him personally either! When we talk about Steve Jobs, we always associate him with Apple. We talk about how his presentations are cool (frankly speaking, I've never really watched his presentations, save for his screwups), his innovation, and how he spearheads the IT industry, but nobody really talks about how's he like as a person.
Perhaps... perhaps, after this incident, there'll be more talk about his personality and character. We'll see. Until then, peace out.
Subscribe to:
Posts (Atom)




