December 14, 2011 Book Reviews No comments
December 14, 2011 Book Reviews No comments
Yeap what a gripping title for the book! It is in Russian originally and it talks about speaker skills, while comparing them to lover skills.
Time to time I deliver some speeches to local user group or at some events. I used to do this a lot inside of the company. After I talked about NHibernate at Kiev ALT.NET, I decided that it’s time to read some comprehensive thoughts from people who speak proficiently. So I took this book.
I cannot rate this book or say it is good or bad, because it is first book I read about speaking. Book is very simple, easy to read and rather short one. It compares giving public speech to the sex. Speaker has to be “man” in connection between him and audience. Also book provides you with lot of exact and specific tips on how to resolve particular presentation issues, such as nervous trembling, parasitic words, gesticulation, etc…
Despite that occasionally I thought some of the things written ridiculously, I enjoyed reading very much and found many advices I’m going to use next time speaking for you.
You might want to go and visit Author’s web site: http://www.radislavgandapas.com/
December 12, 2011 Career 3 comments
Recently I’ve got e-mail from guy, looking for some advice. At glance it sounds like he is worrying about finding his first job as software developer and willing to get some hints/advices.
First of all I would like to thank very much to those people who read my blog posts and who comment or send me e-mails. This is the best feedback I can get and it is the only true measurement of blog’s success.
So, I’ve got this well-written e-mail from student (I guess):
Hi Andriy,
Hope you are doing well. My name is Wes, I just read your articles, I have to say, I am your fan now.. Guys like you make a difference.
I am writing to you because I have the similar passion for programming as you, and that is why I went for my bachelors in Software Engineering, and while in school, I learned many languages like C, C++, Java, VB.NET and ASP.NET.
Out of all, .NET excites me the most. But now when I am about to graduate, I dont really feel good about my programming skills, and getting a job.. The best I have done in VB is made a calculator, made connections to the database, and executed some queries.
What I want from you, is some tips about what my approach should be at this point AND are their any sample projects that you recommend I should do, that will help me learn more and expose me to different sides of the programming world..
I would highly appreciate, if you write back, and I am sure you will.
Thanks – and good luck with your career!
Cheers!
Wes
I’m replying publicly, so I can share with other’s who have similar questions. Wes is not mentioning his last name so you won’t identify him :). Anyway I think that this e-mail is good one and it raises good questions. Starting from now “you” means either Wes or any other starting programming guy looking for some advices.
First of all seeking for personal improvement is great step towards it. I think that once you have clear goal and passion about it you won’t waste your time and life.
I just came across small e-book where found great answer for you from Karl Seguin:
“… If you’re willing to take the time and try it out, you will see the progress. Pick a simple project for yourself and spend a weekend building it using new tools and principles (just pick one or two at a time). Most importantly, if you aren’t having fun, don’t do it. And if you have the opportunity to learn from a mentor or a project, take it – even if you learn more from the mistakes than the successes.”
So I will expend this thought a little bit further.
You would need to write many projects – the more the better. Keep your hands dirty and work with the code, every other day you should feel that code, you wrote yesterday is crap and you can write it better today. If you are still student in Software Engineering be sure that you are fulfilling you time with programming. If you feel that learning courses are not supplying enough tasks for you, just create them for yourself.
I know that when being a student it is very interesting to take part in some sport programming competitions. So do it. You can also take part in some online competitions like Algorithm competitions at TopCoder. Those can be for your gym.
Definitely you need big projects to work on as well. These projects should take from couple days to couple of weeks. Write your own “paint”, not comprehensive one, but at least with basic functionality. Write your own money accounting system with your database, so you learn all basics of data access. You then can change data access from simple ADO.NET to ORM (try Entity Framework or NHibernate), you then can try to explore non-relational databases, like NoSQL. Do some web programming, if you did ASP.NET you can explore MVC ASP.NET. Explore mobile development by just writing same simple calculator for Windows Phone 7. You will get familiar with some Silverlight/XAML. If you are excited about .NET make sure you know C# (personally I cannot understand why Microsoft promotes VB that much, trend is C#).
Find your peers interested in programming. Learn programming in fun way, enjoy it.
Whatever you do, make sure that google in your force.
You will need to learn continuously. Read many books, but know that human forgets 90% of things heard, 60% seen & only 10% of things done. So if you read, but not try things read your time can be wasted. I have another blog post where I propose some tips on how to become successful developer, read those.
As of job. Ask older peers what are opportunities in your location. Visit software companies near you, ask them if they have some learning courses, which skills are in demand for that company. I ensure you, this is not as much difficult as you might be expecting. Also here is my article about career plan for software engineer. Probably it is too early for you to think deeply about career before you actually started as developer, but at least make sure you know how your future job might look like.
So key things:
Hope I have been of some help for you, Wes and Dear Reader.
December 4, 2011 My book 30 comments
I have skeleton of my book ready and flesh is also there, help me get some good looking skin for it.
I need volunteers to read my book or parts of it (in Ukrainian) and provide me with some valuable feedback.
Any feedback will be taken into consideration, until it doesn’t break the whole idea of book (short easy associative examples with code to each pattern).
Also I would need to have your word that you will not distribute book before I officially do this on my blog.
Any volunteer willing to help will be mentioned in book of course.
Cover of my book. If picture in the middle looks ugly to you, please know it is me who draw that over 10 years ago and no way you can copy it.
December 4, 2011 Conferences, NHibernate, Presentation, Success 2 comments
November 29, 2011 Uncategorized 5 comments
Of course there was need for this ORM to be born
object InsertUpdateRow(string tblName, IEnumerable fields, IEnumerable fldsValues, IEnumerable keyFlds);
void DeleteRow(string tblName, IEnumerable fieldsList, IEnumerable fieldsValues, IEnumerable keyFields);
DataTable SelectSQL(string selectSql);
It is fun to work on ORM, so why not take it further
So… here it is – CustomORM
Features at glance:
Now, let me show you some code
Sample fetch
Criteria criteria = CreateCriteria(typeof(Customer), "c") .AddEntity(typeof(Order), "o") .AddEntity(typeof(Employee), "e") .AddSQL( @"left join Orders o on c.[Customer ID] = o.[Customer ID] left join Employees e on e.[Employee ID] = o.[Employee ID] where c.[Customer ID] = @customerId") .AddParameter("@customerId", customerId); List<Customer> customers = ExecuteCriteria<Customer>(criteria);
Sample save
public Customer SaveCustomer(Customer customer) { var transaction = BeginTransaction(); Customer savedCustomer = null; try { savedCustomer = Save(customer); transaction.Commit(); } catch (Exception) { transaction.Rollback(); } return savedCustomer; }
Mappings
class CustomerMap : EntityToTableMapper<Customer> { public CustomerMap() { Table("Customers"); Id(x => x.CustomerID, "Customer ID") .UseAssignedValue(); Map(x => x.CompanyName, "Company Name"); Map(x => x.ContactName, "Contact Name"); Map(x => x.ContactTitle, "Contact Title"); Map(x => x.City, "City"); HasMany(x => x.Orders, "Customer ID"); } }
Get started code
// Let CORM know where your mappings live and that's mostly it MagicMapper.ScanForMappers(Assembly.GetExecutingAssembly()); // Initialize AdoDataAccess or (advanced) implement your own IDataAcces var s = ConfigurationManager.ConnectionStrings["NorthwindConnectionString"]; var ceDataAccess = new AdoDataAccess(s.ConnectionString, s.ProviderName); // You are ready to use you repository, it already has Fetch<T>, Save, Delete
What is at codeplex now and what’s next?
November 21, 2011 Conferences No comments
#mpdays2011 Не хочу бути занудою але всі ці речі загальні для будь якого типу розробки. Де спицифіка розробки під мобільні платформи. #q
@caxarock #mpdays2011 Scrum це гнучка методологія. :)
#mpdays2011 О! Останній слайд із пляжем мені сподобався.
@UkrDaddy А не по кількості людей? Там цікаво про #wp7? #mpdays2011
Ситуація із кнопкою не того розміру або не там дуже знайома. #mpdays2011
За якоюсь історією мало бути 42 а не 7. #mpdays2011
А нашим клієнтам радять тримати телефон на зарядці в автомобілі поки вони виконують роботу. :) #mpdays2011
Таке враження що на #mpdays2011 одні студенти. А де бородаті дядіньки?
@eGoOki ти мене заплутав. Я #wp7 прийнов на #ios і був певен, що там цікавіше. #mpdays2011 хм…
Хочу побакланити презентацію по restkit. Що за слайди із тууучою коду? І що він там говорить… КАПУТ!#mpdays2011
#mpdays2011 Презентеру влаштували інтерв’ю. Таке враження, що ті хто запитують знають відповіді. Тупо фейл…
Музику врубали, щоб блондинка із першого ряду станцювала. Єуех… Давай! #mpdays2011
Про #cloud і #social цікаво. Принаймні Тарас доповідає впевнено! #mpdays2011
@Alokard #mpdays2011 Якщо доповідач толковий, то твітеряни це помічають. Не було б сміття в ленті.
At #mpdays#2011 I understood that the coolest platform is #wp7 not because of presentations, but because of using actual phone here!
Listening to #iOS UI guidelines. I think #metro in #wp7 is much better. #mpdays2011 (I know ’cause I’m using it & it rocks.)
Нас зомбують 25тим кадром із сіськами :) #mpdays2011
Man called C# a bubble! O_o Java isn’t bubble than? #mpdays2011 Crap is it going to be HTML and JS?
November 18, 2011 Conferences No comments
November 15, 2011 Career 17 comments
November 1, 2011 Success, WP7 6 comments
We managed to create something more exciting. We invented pure FUN. So other 3 of us created mini-game “Face 2 Face”. Splashscreen below:
October 22, 2011 HowTo, NUnit, UnitTesting, WP7 3 comments
If you are building Windows Phone application you probably have faced… well… not rich support for unit testing. But of course there is one rescuing thing – WP7 is almost the same Silverlight application. Thus you have wider area to search for solution. Awesome… but I wouldn’t write this blog post if everything is that easy. Right?
Microsoft for some reason doesn’t care about huge community of those who use NUnit for their projects, and believe me not for small projects. So there of course is mstest project template that allows you to run tests inside of the appropriate CLR. There is good Silverlight Unit Tests Framework and here is information on how you can cheat in order to get it working for the phone. Problem with these two frameworks is obvious – they are not supporting console – they run in native for Silverlight environment – either on phone or in web. See pictures (phone and web respectively):
I know that there are ways to make it happen from console under (msbuild for example this temporary wp7ci project on codeplex). Hold on… one second. Again something very specific to Microsoft – msbuild. But what if I’m using nAnt?
Of course there is port of the NUnit for the Silverlight (here is how), also you can change tests provider in the “Silverlight Unit Tests Framework” (further SUTF).
I came up with odd solution to force nunit-console to run unit tests in command line. After I observed it crashing with error TargetFrameworkAttribute I reflected mscorlib and googled a bit to discover this attribute exists in mscorlib of 2.0.5.0 version, but nunit actually targets 2.0.0.0 one (.net 2.0). Thus I decided to download sources of NUnit and recompiled those against .net framework 4.0 (mscorlib 2.0.5.0). Reason for this error is that Silverlight also uses higher version of mscorlib.
Before upgrading to Mango our tests for WP7 were created by testDriven (to be honest – it is what they use inside of their SUTF). We didn’t have support for command line and tests were running only because they are so Silverlight compatible.
With updating to Mango everything just died. Tests projects simply didn’t get loaded into solution. With this message:
“Not a big deal” you say. Actually a big deal, because you can get rid of this message by editing project files to have target framework profile set to WP71 and to reference only WP71 assemblies. But in this case you lose all of you compatibility with Silverlight and when you run your tests you start to get weirdest exceptions in the world like this one below:
System.DivideByZeroException : Attempted to divide by zero.
at System.Collections.ObjectModel.ObservableCollection`1..ctor()
At least this brings some more sense:
System.InvalidProgramException : Common Language Runtime detected an invalid program.
Solution I came up with is not 100% right, but at least it works. I just had to pretend that I’m still completely compatible with Silverlight. So I created copy of my project. One is considered to be used from command line and other for usage from VS.
Project 1 is used under VS has correct references directly to WP71 assemblies, like below:
<Reference Include="System.Windows">
<HintPath>..LibrarySilverlightWP71ReferencesSystem.Windows.dll</HintPath>
</Reference>
This ensure that VS loads your projects without errors, also you make it think it is WP7 by these:
<TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>
and this:
<Import Project="$(MSBuildExtensionsPath)MicrosoftSilverlight for Phone$(TargetFrameworkVersion)Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)MicrosoftSilverlight for Phone$(TargetFrameworkVersion)Microsoft.Silverlight.CSharp.targets" />
Project 2 is used for console and is pretended to be pure Silverlight, so it has:
<Reference Include="System.Windows">
<Private>True</Private>
</Reference>
Which in reality copies (because of <Private>) wrong assemblies – from Silverlight, not from phone.
You would need to play a lot with which assemblies you want to get in folder where you run tests. I do have some confidence that Silverlight and WP7 are much compatible thanks to this brilliant explanation of what is WP7 from developer’s view.
At #1186 I finally got build working and running tests. At #1193 I invented this Silverlight pretending trick. And finally till build number #1196 I ignored couple of incompatible tests and fixed some really failing tests.
Hope this helps someone. At least it is going to help my team.