I am very annoyed with Justin at the moment. He is giving away all the super secret stuff, and doesn't make you sign in blood anywhere.
Think about this idea, all you have to do is to record a 5 minutes screen cast, and you get the chance to win a book about ASP.Net, ADO.Net, T-SQL or C#.
Where is the week long bootcamp with the sergeant scream at me what the diff between value types and reference types? Where is the torturous travel through the Path of The Page Lifecycle?
Advance warning: I have not run this by anyone, and I have no idea if this is even possible.
I mentioned that I am going to do an advanced NHibernate course in a couple of weeks. That is probably going to be a private one, for a client of us (well, a client of We! :-) ).
Among my favoraite passtimes there is talking, and talking to a crowd is something that I have learned to enjoy. Seeing the response for my Active Record talk and the NHibernate's course that I am doing, I wondered if there will be any interest in an NHibernate course. Something that can take a developer from "I heard about NHibernate, it is this new hibernation feature in Vista" to leveraging NHibernate in real world application. Including all the pitfalls, best practices, etc that I have run into. I believe that I have both the professional knowledge to do so, as well as the ability to teach developers the right & easy way to work with NHibernate.
I have done such a course before (private one), and you can see some of the presentations here. The company where I run this course is now using NHibernate as the primary - and nearly exclusive - data access framework for a very big project (with very big stategic implications).
Like I said, this is currently wishful thinking, since I thought about the idea of doing this roughly an hour ago. What I would like to find out now is if there are developers out there who think that they could benefit from this. So, if you are interested, I would appriciate it if you could leave me a comment (or contact me directly, by email or phone) tell me so, and how many people you think would be interested in this.
Like I said, this is currently just something that I think would be really nice and fun to do. I would like to make this happen, but I need some head count to show that this is a feasible idea. Feel free to tell me if this is going in completely the wrong direction.
I was asked why it is not recommended to code in Hebrew. I decided to question my initial response, and give it a shot. I quickly gave it a try and created the following domain model. I don't expect you to be able to read it (although if you can, you'll find it hilarious).
Here is my DDD in Hebrew, the classes are Employee (right, top), Report (Left, Top), HoursReport (Middle, Bottom), WontBeHereReport (Left, Bottom) and Repository<T> (Right, Bottom):

I run into a couple of issues just with designing this diagram:
- Trying to specify a generic parameter in Hebrew cause issues because of alignments. Basically, the whole class name is presented in the wrong way (this is a common issue with mixing Hebrew & math together).
- Intellisense is mostly useless, check out this, you may not be able to see it, but the Hebrew is half-way reversed.
- For some reason Visual Studio is working a lot harder when I write code in Hebrew.
Let us move to more serious issues, take a look at this simple program:

Main issues:
- Hebrew is written right to left, the code here is structured left to right.
- Hebrew doesn't have upper/lower casing, so words need to be seperated by "_".
- I often need to switch keyboard setttings ( even something as simple as "<" has different orientetions in Hebrew and English).
- I need to use primitives (such as DateTime) in English.
- I need to mix English and Hebrew in the same line (see the "new" lines).
- All control flow is in English.
- You can't grep this source. At least not easily. Hebrew and the command line do not mix.
That is even beside the nice point of the enconding hell that you get yourself into. It is very easy to save this as ASCII (if you open it in an editor that doesn't support unicode, or simple use a tool to go over it) and lose all the hebrew characters.
Sorry Eliezer, but you will have to write Hebrew# and language pack, and write a translation layer for the framework if you really want me to use it.
Note: cross posted from my main blog
שחר פרסם מאמר על יכולת ההרחבה של ASP.Net מול PHP. להזכירכם (כל מי שחי במערה בחמש שנים האחרונות), PHP הינו קוד פתוח ו ASP.Net הינו קוד סגור.
חלק ממה ששחר מציין אינו נכון, ASP.Net מאוד קונפיגורבילית בהרבה רמות. למען האמת, אני חלק מפרויקט שמחליף חלק ניכר מהתשתיות של ASP.Net (את כל ה WebForms / Page Controller מודל) במודל שונה לגמרי. ואנחנו עדיין משתמשים בהרבה מאוד מתשתיות ASP.Net.
לא יצא להסתכל (לעומק או בכלל) על הקוד מנוע של PHP, אבל אני יודע שדברים דומים אפשריים גם שם. לא צריך לכתוב מנוע מחדש כאשר ניתן להרחיב אותו חיצונית. לצורך העניין, תחשבו על HttpModule שמשנה את הדרך ש ASP.Net מתנהג ללא צורך לשנות את המנוע. הדאגה שאני לא אוכל להשתמש במנוע הספציפי שלי באתר היא לא דאגה מבוססת לדעתי בכל מקרה. שרת Linux ל PHP ממש לא עולה הרבה, ככה שהדאגה היחידה היא אם הייתי רוצה אירוח חינם או מאוד זול. במקרים האלה, אני לא אשקיע הרבה זמן בכתיבת חלקים ממנוע PHP מחדש.
הצד השני של המטבע, אבל, הוא שב PHP אין מקומות שמישהו החליט לסמן "הכניסה לעובדים בלבד", כמו שיש (והרבה) ב ASP.Net (וב .Net בכלל). שני דוגמאות שעלו לאחרונה היו Caching ו Batching, שניהם טכנולוגיות מאוד מועילות, מאוד חשובות, ובשניהם אני לא אוכל לעשות שימוש משום שמישהו במיקרוסופט החליט להפוך אותם לפרטיים.
זה לא בדיוק מעודד אותי כאשר אני בא לפתח אפליקציות מורכבות. כן, זה לא פשוט, אבל אני יודע מה אני עושה, ואם אני רוצה לירות לעצמי ברגל, זכותי. אני מאוד לא אוהב סיטואציות שבהם מישהו הלחים לי את המכסה מנוע כדי שאני לא אתעסק עם הקרבורטור.
התקשר אלי הרגע חבר שלי (לא מתכנת) ושאל אותי אם אני רוצה עבודה בתור מתכנת "סי סולמית".
אני עדיין צוחק.
רציתי להודיע שנבחרתי להיות חבר בפרויקט
NHibernate.
המשמעות היא שיש לי עכשיו את היכולת להשפיע בצורה ישירה על NHibernate ועל ההתקדמות העתידית שלו.
The seven deadly sins of software development.
I really liked Speaking with an Accent and Excessive Code Prive
A must read.
כרגיל, כל השמות של הדברים החמים באנגלית נשמעים פשוט נוראים בעברית, אבל נסתדר. Inversion of Control - היפוך שליטה. Dependency Injection - הזרקת תלויות. הקיצורים שלהם הם DI ו - IoC
אחד מהעקרונות הכי חשובים בפיתוח תוכנה הוא הפרדה של תלויות. אם יש לי מחלקה א' שתלויה במחלקה ב', כל פעם שאני משנה את מחלקה ב', אני צריך לשנות את מחלקה א' וכו'. תלויות מרובות גורמים לכך שקשה לעבוד עם הקוד, קשה לשנות אותו ולרוב בלתי אפשרי לבצע בדיקות בצורה יעילה.
דוגמה פשוטה היא מחלקה שקוראת ממסד נתונים ע"י יצירת SqlConnection והעברת Connection String בתוך הקוד. אם אי פעם נרצה לשנות את שם המשתמש של האפליקציה, נתצרך לקמפל מחדש. זו דוגמה להתנהגות לא מומלצת, וקל להמחיש את הבעיתיות בכך. רוב הבעיות הם לא כ"כ ברורות, אבל הם גורמות לאותה בעיה. כל שינוי קטן מחייב הרבה מאוד עבודה.
DI נותנת מענה לבעית התלויות בצורה מאוד פשוטה, היא מכריזה כי במקום שכל מחלקה תיצור את התלויות שלה בעצמה, היא תקבל אותם מבחוץ, באמצעות פרמטרים ל constructor או באמצעות properties. חלק מ DI הוא שימוש נרחב בממשקים (interfaces) במקום במחלקות, משום שהדבר מאפשר להחליף את המימוש של התלות ללא שינוי הקוד (לדוגמה, אם רוצים לעבוד מול מסד נתונים כלשהו, צריך להשתמש ב IDbConnection ולא ב SqlConnection).
הבעיה ב DI היא שזה יוצר עומס על המתכנת, בכל פעם שהוא רוצה להשתמש באיזהו מחלקה, הוא צריך להעביר לה את כל התלויות שלה. כאן נכנס IoC לידי ביטוי. IoC דואג ליצירת כל התלויות של המחלקות ע"פ קונפיגורציה מסוימת. זה מאפשר לעבוד בצורה מאוד נקיה וללא הטרחה של העברת תלויות. IoC גם נותן שירותים נוספים, בדרך כלל, כגון ניהול משך חיים של אוביקטים, caching ן Aspect Oriented Programming.
אני משתמש בעיקר ב Castle Windsor, שהוא IoC Container מעולה, עם מספר יכולות מדהימות לעבודה עם 2.0 ו generics.
פירסמתי מאמר קטן על איך ניתן להשתמש ב Active Record ן Asp.Net כדי לקבל את רוב היכולות של DLinq היום.
אתם יכולים לראות אותו כאן.
For some reason, I have not heard much about Memcached in the .Net circles, which is a shame. Memcached is a distributed memory caching system, which makes it very interesting for ASP.Net applications in web farms scenarios (but not just), since the ASP.Net cache is local cache, and can go out of sync with the other caches on the
The basic idea is that a Memcached server is listening on a port, and you set and get data from it. So far, it is not very exciting, but the nice part is that there everything is in memory, and that you can use multiply Memcached server to increase the cache size indefinitely very cheaply. Because everything is done in memory, and the server is carefully designed to hold no locks, the performance is really impressive.
An interesting scenario is to take couple hundreds of megabytes from each computer in the organization, and use that to fuel the cache size for the servers. Memcached has automatic failover support, so you can just ignore Memcached server going offline for a period of time, and it is very low on CPU usage.
I intended to write a bit more about it, but I found this article, that explains how it works, and it even have some pretty pictures, so it is pretty useless for me to try. :-)
A couple of interesting points Memcached:
- It runs out of process, so it is not affected by IIS Reset, restarting the application, etc. This is very important if you rely on a cache for good performance, and especially if you application startup loads big amounts of data. This is very important in development, since we can safely skip this initialization step when we are developing.
- Memcached can cache any byte stream, which means that in .Net, it can hold any serialized object
- It is one of the options for NHibernate's caching, and the recommended one for use in web farms. This make it very attractive to me, since I can flip a switch and start using it, without touching my code.
- Make sure that you set it up in a way that makes maping highly unlikely (in other words, if you put it on a 1Gb machine, don't tell it to cache 2Gb), there is no point in paging in a caching server.
- Using Memcached can significantly reduce your database load, turning it into a mostly write store.
- Many people seem to be using Memcached as a fast storage engine for interesting data that shouldn't be persisted. Caching calculation, behavioral patterns, etc.
I'll just add that Memcached servers exists for unix and windows, and there are client APIs for just about anything, including .Net.
כותבים את הקוד ב C#, הוא מתקפל ל Javascript, ורץ
בצד לקוח
הבחור עובד עבור מיקרוסופט, ככה שסביר להניח שאנחנו
נראה את זה יחד עם אטלס באיזשהו שלב.
זה היום שכלים טובים
חדשים.
ReSharper 2.0 שוחרר היום, והוא אחד הכלים היותר
טובים לעבודה עם קוד.
השתמשתי בו הרבה זמן ב .Net 1.1 ולאורך כל תהליך הבטא
הארוך שלהם.
ללא שום ספק, זה הכלי מס 1 כיום לשיפור היעילות של כל
מי שעוד עם קוד.
הכלי הזה כ"כ חכם שזה לפעמים פשוט
מפחיד.
אחת הבעיות בתהליך הבטה היה חוסר יציבות מסוים כאשר
היה קוד שלא תאם לסטנדרטים של 1.1 (generics, delegates, etc).
יש דמו כאן:
וניתן להוריד גרסת ניסיון כאן:
http://www.jetbrains.com/resharper/download/
מומלץ בחום!
אתם מכירים את הפרסומת של מיקרוסופט "תגשים את האבטחה שלך?"
היא משגעת אותי. אני לא בטוח את זו טעות כתיב או שזה מכוון, אבל זה ממש מעצבן. כל פעם שאני רואה אותה אני משתגע מחדש.
הסרט הזה הוא משהו שחייבים להראות לכל מפתח. הוא מפרט לא רק את הסכנות, אלא גם עובר על איך אפשר לנצל אותם על מנת לקבל שליטה מוחלטת באפליקציה, כולל אפליקציות נילוות שלהם אין גישה לאינטרנט.
מה שמעניין בסרט הוא שהאפליקציה נראית לי הרבה יותר מציאותית מאשר הדוגמאות שמראים בדרך כלל בהדגמות אבטחה.
המילטון פרסם
מאמר נוסף על
Active Recordבמאמר הזה הוא מפרט על תהליך האתחול של Active Record.
גם המאמר וגם הספריה מומלצים בחום
More Posts
Next page »