Archive for the ‘programmer’ Tag
Sleepless in FYP
spend 2 days to do my Final Year Project graphic user interface design and develop freelance project, today skip whole day class, feel guilty. didn’t sleep much, feel very very very tired and very worry, next week have to submit something to supervisor. Other than FYP, I still got 2 programming assignment on hand, which is web service and distributed computing system, and many test coming soon, suffering. I don’t understand why TARC students always rush their assignment in last minute, this is culture or what?
I working hard for my FYP right now and don’t know my partner doing what right now? sleeping or study or rushing FYP too?
rush 2 days in Graphic Interface design, spend much time in matching colour, no colour sense mah, I plan to use other colour to create another feel to users, but I am fail, who know me very well sure know my design style is Black Colour, so better choose back my farvorite colour- black as my theme colour, hahaha. Finally come out something. My housemate ask me you are designer or programmer? hahahahaha, I am also a designer I answer. I very enjoy in designing GUI, because I will be the UX designer in future, hahaha.
my hand drawing prototype.
come out the real HTML template (T.T got blood and sweat), an Innovation Ecommerce Platform GUI. dare to innovate.
thank you to all those designer friends who give me suggestion in matching colour, thank you very much.
Next Task is FYP class design and control design, web service assignment, distributed computing assignment and Freelance project migrate database.
wildcard searches using LINQ
recently work on ASP.Net Project.
use LINQ as my Query Language, this is my favorite feature of .Net 3.5.
original I write my Search Query like this:
var searchQuery=from a in db.customer
where a.ID=param
select a;
this is not a wildcard search query , you only can get the result when parameter(search key word) exactly same with database record. So far customer no complain the search engine, because they don’t know and my boss also din ask me to do wildcard searches. but as a programmer, you do not want to create a system without standard. My boss always blame me do redundant work, customer won’t appreciate it. But I not care, just a minor change only.
to do wildcard searches in sql is use LIKE operation and wildcard characters( %), I believe you familiar than me if you still using ADO.NET to query your database. it something like this:
SELECT *FROM CustomersWHERE Phone LIKE '%param%'It's fairly simple, if you using LINQ, you just need to know .StartsWith, .EndsWith, and .Contains this 3 syntaxes. below show comparison of LINQ and SQL:
|
LINQ |
SQL |
|
| StartsWith |
var query=from a in db.customer
where a.ID.StartsWith(param) select a; |
Select*
from Customer where id=param%; |
| EndsWith |
var query=from a in db.customer
where a.ID.EndsWith(param) select a; |
Select*
from Customer where id=%param; |
| Contains |
var query=from a in db.customer
where a.ID.Contains(param) select a; |
Select*
from Customer where id=%param%; |
it look longer than SQL, but you don’t forget when you do binding in .net project you still need write very very long ADO.NET statement. Compare to ADO.NET, LINQ(actually also part of ADO.NET) is simply and easy, just 3 sentence to create bindable query.
So Far, I just know this method to do wildcard search, any better suggestion?
Style
Be a programmer in my intern company.
I writing my code with my style,
I don’t want my program can compiles and can runs correctly only.
I write elegant code,
I want my program flexible, maintainable,reliable, and reusable.
Attain the level of elegance is my goal,
I hate rojak code
I hate planless analyst, planless programmer, planless system.
I mind UX.
I created high UX system.
I enjoy in UI design.
poor UI design not my style.
I won’t force people accept my style, but at least try to understand this, my dear clients and my manager. don’t keep change your requirement and rush me.
发表评论