The reason to use repository pattern
In our AdvGenCMS, we use the repository pattern in the data layer. Inside each repository, there is a LINQ datacontext. We are completely hiding the LINQ from the upper layers. In this way, we can switch to use another ORM technology in the future without other layers. We need to the repositories. That is the reason to use repository pattern
Get your upgrade Windows 8.1 from Windows 8
Today, a friend asked me whether that is good to upgrade from Windows 8 to 8.1. My answer is "Good,please go ahead"! Windows 8.1 is better than Windows 8. At least you will have IE 11 and a "Start" button, although that is a kind of "Windows 8". Moreover, this upgrade is free. I can't think of any reasons to stop that.
IOS Error:'Cannot create an NSPersistentStoreCoordinator with a nil model'
I backed to build my first iOS app again. Today, I got this error:'Cannot create an NSPersistentStoreCoordinator with a nil model'.
Actually, that is easy to fix.
Please make this line of code:
Code
NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"[name]" withExtension:@"momd"]; |
The [name] you filled in is same as your model file (.xcdatamodeld).
For example I got a TipRecord.xcdatamodeld then this line should be:
Code
NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"TipRecord" withExtension:@"momd"]; |
The most productive time
I found an interesting point. During few years, I meet a number of programmers in Australia and Hong Kong. The most of them have told the most productive time for them is around 9pm to midnight. The normal office hours are not very suit for them! That is interesting! What do you think about this?
Just Not about Coding
A lot of people believe we only need to learn some programming languages to be a programmer. In the real world, we need to communicate with other human beings, we need to do the documentations, at least we need to write some notes about operations instructions. Thus, we still need to learn a human language!