Lucene.Net 101: What is Lucene.Net?
Posted in Software Programming | Thẻ:Lucene.Net
Chính thức tuyên chiến trên toàn mặt trận :D
Vậy là cách đây ít phút mình đã chính thức tuyên chiến trên toàn mặt trận với cái kiểu làm việc 4` ở một cty mà ai cũng biết là cty nào đấy
. Cuộc chiến đã khởi đầu từ cách đây 02 tuần với một mặt trận rất nhỏ, tuy nhiên sau đó do sự thờ ơ thiếu can thiệp kịp thời của các nước có vị thế lớn hơn dẫn đến tình hình trở nên xấu đi, chiến tranh lan rộng sang các nước lớn hơn (và có quyền lợi liên quan). Trong lúc đó thì một liên minh HC-IT lại bất ngờ nhảy vào tham chiến, tình huống này là hơi bất ngờ, và mặc dù là lực lượng chênh lệch khá lớn (1 chọi > 3) tuy nhiên bên mình có các vũ khí hạng nặng là sự chuyên nghiệp, rõ ràng, và đứng trên quyền lợi chung nên không có ngán gì hết, chơi luôn.
Dù biết rằng chiến tranh là không hay ho gì, các bên đều thiệt hại ít nhiều, mình vốn yêu hoà bình, nhưng thực sự thì “ta càng nhân nhượng thì thực dân Pháp càng lấn tới”, không trì hoãn được lâu hơn nữa.
Hiện tại các nước lớn nhất vẫn giữ thái độ im lặng ”toạ sơn quan hổ đấu”, chưa biết tình hình sẽ tiếp diễn như thế nào. Kịch bản thường thấy, rất có thể xảy ra, là sẽ đàm phán để hoà hoãn và chìm xuồng dần theo thời gian. Các nước lớn không thể hay không muốn giải quyết dứt điểm nguồn gốc xung đột sẽ luôn là câu hỏi không có phần trả lời?
Mình đang đá pressing toàn sân, thỉnh thoảng thi đấu thể thao phát cũng thích heheheh
Life is not easy
Posted in Misc.
New desktop for entertainment at home – Compaq Presario CQ4011L
Sau vài lần định mua một cái desktop mới để thỉnh thoảng xem mấy cái phim HD, nghe ít music, slideshow mấy cái photo, chơi ít game… (+ tăng độ utilization của cái TV mà đang chỉ thằng Gấu xem Bibi là chính
) tóm lại là toàn nhu cầu linh tinh @ home cho cả mình và thằng Gấu. Mấy lần vẫn chưa mua được vì cứ lắm options quá, rối mù cả lên. Cho đến sáng nay thằng Dũng nó mới bảo là anh mua cái x nào chẳng được, cứ ra chọn thích cái nào thì lấy, lởm như nhau ấy mà hê hê
.
Thế là chiều nay lòng vòng cuối cùng mua ở bạn Pico Plaza, mấy lựa chọn ban đầu là mấy model Elead, eMachine nhỏ gọn hay HTPC của SPC với lại Phúc Anh bay mẹ nó đâu mất. Mua đúng cái chưa biết đến bao giờ
.
Giờ đang cài quả Windows 7 Ultimate bản MSDN của thằng HùngNĐ cho nó máu, trong lúc cài thì Google phát thấy quả review của PC World VN cũng tàm tạm, vớ vẩn mai xem phim HD mà hình nó lại nhảy như phê thuốc lắc thì bỏ mẹ
.
Thông tin chi tiết chi tiết cấu hình xem ở đây – Compaq Presario CQ4011L Desktop PC.
(16).jpg)
Update: HD movie capability is tested with Bee Movie, passed
Hội với chẳng chợ, nhí nha nhí nhố
Hôm trước vô tinh đọc đâu đó thấy cái tin này “Hội chợ Tết Việt 2010” (hội chợ 4`), thấy quảng cáo tùm lum thấy hay hay thế là cho ông nhóc đến đấy xem Tết truyền thống dân gian xưa nó thế nào. Hoá ra là nhí nhố, đưa tin bố láo ăn cắp, viết lăng nha lăng nhăng, hội chợ cái x gì mà lèo tèo mấy gian hàng, vài chục nhân viên, và khéo chưa được chục mống khách (đang ngày thứ hai/3 ngày). Mất công đi ra tận sân đấy thôi cũng phải cho thằng nhóc nó vào chạy loăng quăng tí. Giờ nhìn lại cái link trên mới thấy bố của 4`, đến cái hình minh hoạ cũng không kiếm nổi một cái nào ra hồn.
Ngứa tay thôi cũng móc máy ảnh ra làm vài kiểu lấy hình minh hoạ cho blog vậy
, chắc mấy đứa nhân viên nó tưởng mình dở hơi, có cái x gì đâu mà ảnh với ọt
.
Toàn cảnh hội chợ, vắng hoe.
Và đây là hai vị khách hiếm hoi của hội chợ
Posted in Misc.
Reading ebook on an iPod Touch
I’ve read eBooks on my Nokia E61, and its newest model Nokia E71 for now but their limited screen size is really an issue with my eyes (I’ve already worn a 3 diopter prescription glasses
). Suggested by Cuong, my former boss
, an iPod Touch with 3.5 inches large – high resolution – true color screen and Kindle Reader application is really a great device for reading ebook, anywhere, anytime
. I decided to replace my most favorite Nokia E71 today by an iPod Touch and a small/simplified Nokia 1202 mobile phone
Update: 1202 function is too limited, for example, I can’t sync. address book with Outlook so I replaced it by a new Nokia 6300 recently.
Posted in Misc.
C# Naming Convention
One of the tasks that I often add to my to-do list at starting time of a new project is defining a project standard naming convention. The most useful source that I’ve always asked team members to refer to is MSDN’s Design Guidelines for Developing Class Libraries. Although its name is likely only for libraries, it is still a good reference for writing any piece of code in C#. You can also google for tons of free convention guidelines but most of them is long and mixed with personal style of the author so they are often not suitable for us, for example I really don’t like underscore in member field names even I was a C++/MFC programmer before .NET comes to the market. Inspired with a blog post that I’ve read somewhere before, I’d write a snippet of code that shows most common type of conventions which we use every day as a C# developer. I could not google that post again and just send its link to my team because it promoted underscores
. Hopefully I will no longer have a chance to read code that written in several conventions from Java, VB, C# worlds all in a class.
1: using System;
2:
3: // All name spaces are PascalCased.
4: namespace HappyProgramming.CSharpNamingConvention
5: {
6: // Enum is PascalCased and singular. [Flags] enum is plural.
7: public enum VehicleType
8: {
9: Bus,
10: Train,
11: Boat,
12: Bycycle,
13: Motorbike
14: }
15:
16: /// <summary>
17: /// This is class header comment. Class name is PascalCased.
18: /// </summary>
19: public class NamingExample
20: {
21: // All public fields, including constants are PascalCased.
22: public const int MaxSpeed = 100;
23:
24: // All private fields are camelCased.
25: private DateTime createdDate = DateTime.Now;
26:
27: // All properties are PascalCased.
28: public DateTime CreatedDate
29: {
30: get { return createdDate; }
31: set { createdDate = value; }
32: }
33:
34: /// <summary>
35: /// This is method header comment.
36: /// All methods are PascalCased and start with a verb. All parameters are camelCased.
37: /// </summary>
38: /// <param name="routeName"></param>
39: /// <param name="vehicleType"></param>
40: public void CalculateAverageSpeed(string routeName, int vehicleType)
41: {
42: }
43: }
44: }
Posted in Software Programming
Bad code, ugly code, and stupid code
I’ve conducted several thoroughly code review since last week, although adding cache support is most focused in these reviews, I couldn’t ignore low quality code snippets that our developers made with current code base. There are many pieces of code that duplicated itself, has completely no comment, mixed coding convention (there are even many coding styles in just a class
), inefficient implementation of business rule, messy code ordering, long comment out code…
For example, we found this method yesterday that contains some coding issues:
1 /// <summary>
2 /// Gets the count item on page.
3 /// </summary>
4 /// <returns>top numberitemperpage for search</returns>
5 public string getCountItemOnPage(string viewDataKey)
6 {
7 string strvalue = string.Empty;
8 config = (PagingSortingConfig)configRepository.GetConfigData(viewDataKey,typeof(PagingSortingConfig));
9 pagingSortingViewData.Config = config;
10
11 foreach (string item in config.NumberPagingItem)
12 {
13 strvalue = (string)item;
14 break;
15 }
16 //return count item top of list number item per page (ex. [25, 50] then select 25…)
17 return strvalue;
18 }
1. Method name is camel-case so it doesn’t follow standard C# coding convention.
2. The first three lines can be replaced by a method that do exact same thing in the same class to increase reusability.
3. The variable strvalue doesn’t neither follow C# coding convention nor Hungarian style in old time (it makes you remember VB code).
4. Do you know why is there a strange foreach here that doesn’t have any comparison and break immediately in the first loop? I completely don’t know what the reason is, but I can guess that the developer lack both ability and attitude to write good code.
5. In the loop, is it necessary to cast a string into another string?
6. Is it appropriate to return a “number” value in string data type?
7. And you can hardly be aware that this method will change the global variable pagingSortingViewData.Config.
Posted in Software Programming
Links (re-post)
Đến Israel nghe “sóng lớp phế hưng” của lịch sử
Can China save the world? (Trung Quốc có thể cứu thế giới?)
Marriage: For Worse, Then for Better
How to Using the N* Stack
A multi-part tutorial that guide you step by step building a .NET application with N* frameworks.
Free C# 3.0 Pocket Reference Ebook
Server components – How to choice and build a perfect server
Bảy nàng con gái của Eva (The Seven Daughters of Eve: The Science That Reveals Our Genetic Ancestry)
Posted in 23445
Thạch sữa chua Natty, quảng cáo chuối, tên còn chuối hơn
Posted in Misc.
Tiendq.com
You’re welcome to visit my new home at http://www.tiendq.com
Posted in Links










