I am involved in the teaching and organization of the course “Security and Administration of Oracle Database” which is held for the MSc programs in the Faculty of Mathematics and Informatics (FMI) of Sofia University. The course is part of the MSc program “Information Protection in the Computer Systems and Networks”. The main lecturer in the course Nikolay Manchev is the former Oracle employee with very rich experience with Oracle Database administration and author of a comprehensive book about Oracle Security in 10g and 11g.
Today was our first lecture of the course. The nice thing is that the group of students is small (less than 30 people). The small group of trainees (as it was reported at OpenFest’2009 - see Vasil Kolev’s talk on education at OpenFest) is very important for the effective training. When all people are not much and all of them sit in a relatively small lab, this allows interesting discussions and direct interraction with the lecturers. Most of the students have some experience with databases and SQL so their questions and opinions during the lecture were interesting. I expect very interesting and useful course with exiting experience for both speakers and students.
Posted by nakov as news, blog at 1:01 AM EET
Comments Off
Yesterday I delivered a talk at OpenFest’2009 to share my rich experience in writing free open-source books with a large team authors and editors. Particuarly I presented the methodology, the organizational and management practices I applied during the work on my last successfull project of this kind: the open source book “Introduction to Programming with Java” written in less than 6 months by a team of 30 authors, consisting of 25 chapters and 962 pages. In the presentation and demonstrations I focused on the most important activities and practices that make such projects successfull:
- Defining the scope of the book (list of chapters)
- Creating a detailed guidelines for the authors specifying the writing style and practices
- Defining the templates for each chapter (topic) containing its structure (headings, subheadings and TODOs)
- Conducting the team meeting to assigning a chapter to each of the authors
- Creating a project plan, assigning tasks and deadlines for each author and tracking the work progress
- Managing the authors and working with authors missing their deadlines
- Performing a review of the text
My presentation (in Bulgarian) and all demonstration real world examples are available for download:
Visit the Web site of the book Introduction to Programming with Java to see the result of described book writing methodology: www.introprogramming.info.
Posted by nakov as news, blog at 9:33 PM EET
Comments Off
Today I had a technical talk at OpenFest 2009 along with my colleague Vesko Kolev. We presented the OCR technologies and the open source OCR engine Tesseract.
I demonstrated hot to download and compile tesseract, how it works, when it recognizes text correctly and when it fails and how to train it in a new language. I trained Tesseract for Bulgarian and English. The full presentation is available for download along with the demonstration scripts:
Enjoy.
Posted by nakov as news, blog at 2:33 PM EET
Comments Off
ASP.NET membership providers are nice framework for managing users and roles in ASP.NET Web applications but they have a strong weakness: they do not support transactions.
Why We Need Transactions During User Registration?
We may need to use transactions for example when we want to register new user account, assign few roles to it and configure some other tables for the new user, e.g. a table keeping user’s postal address and phone number. In this case if user registration fails for some reason and we are not in a transaction, the user could be partially registered and the database could become in inconsistent state. Imagine that during the registeration of new user called “peter” his address it too long to fit in the corresponding table column. The user registration will fail but the user will be partially registered and when Peter try to register again with a shorter address his preffered username “peter” will no longer be available. This is called “partially registered user”. Obviously we need to perform the entire user registration process in a transaction to avoid partially registered users, right?
Standard ASP.NET Membership Providers Do Not Support Transactions
To avoid incorrect behaviour during the user registration process described above we need to use transactions. We have two options:
- Traditional ADO.NET transactions.
- Using TransactionScope based transactions.
Standard ADO.NET Transactions
Using the traditional transactions from ASP.NET is not directly possible with ASP.NET membership providers because each operation they provide is supposed to open a new (their own) database connection with separate autonomous transaction. You cannot pass an open database connection and already started transaction as parameter to Membership.CreateUser(…), at least with the latest Oracle providers (ODP.NET 11.1.7.20). The membership provider will always establish a new database transaction and will register the user in separate database session and transaction.
TransactionScope and Distributed Transactions with Oracle
Using TransactionScope could potentially solve the problem but it will cause use of a distributed transaction (one transaction for your database connection and another transaction for the connection that the membership provider internally opens). This is a little bit tricky with the latest Oracle 11g Data Providers for .NET (ODP.NET). First you need to configure the connection parameters in a specific way (see the ODP.NET documentation). Second you need to install and run a special service called OracleMTSRecoveryService (which failed to install on 2 of my 3 testing environments with freshly installed Windows). Third, the Microsoft Dictributed Transaction Coordinator (MSDTC) should be running to handle the two-phase commits. Last, but very important problem is that distributed transactions just do not work with some combinations of Oracle database, Oracle Client and ODP.NET (I don’t remember the exact versions but some combinations just fail with an internal Oracle.DataAccess unmanaged exception). After few hours of testing TransactionScope and distributed transactions with Oracle database on various environments and reading lost of negative comments in the community forums I concluded that using distributed transactions with Oracle in tricky and I prefer to avoid it.
Hacking the Oracle ASP.NET Membership Provider
Due to the problems with the distributed transactions described above I decided to extend the Oracle.Web.dll library that implements the Oracle membership provider, Role provider, SiteMap provider, etc. with functionality allowing to pass an open database connection with an associated active transaction to all major operations (e.g. CreateUser, DeleteUser, etc.). What I did was to decompile the Oracle.Web.dll with .NET Reflector and its plugin called Reflector.FileDisassembler and obtain C# source code and Visual Studio 2008 project. The provider was not obfuscated and the bugs introduced during the compilation were fixable in few minutes (decompilation always is imperfect and the code is uncompilable). Adding additional parameter to all major provider functionality could take an hour or so and you can compile the Oracle.Web.dll library for x86 or x64 platforms. Note that Oracle.Web.dll is platform independed but uses Oracle.DataAccess.dll which has unmanaged code and is platform specific (32-bit or 64-bit).
The final result was my libraries called Extended.Oracle.Web.dll and Extended.Oracle.Web-x64.dll which extend the standard Oracle Membership provider (comming with ODP.NET) with ability to provide an open database connection when using the provider functionality. Using such functionality is simple:
Finally we have transactions with the Oracle membership provider but without distributed transactions. Happy hacking!
P.S. I will not provide the modified x86 and x64 versions of Oracle.Web.dll and Oracle.DataAccess.dll because I believe that decompiling and redistributing non-open-source software from Oracle is “a little bit illegal” and I did the above decompilations just for training purposes and experiments (until the opposite is proven).
Posted by nakov as .net, blog at 1:06 AM EEST
Comments Off
My open-source book “Introduction to Programming with Java” has new Web site: www.introprogramming.info. The book is written by a team of 30 authors managed by me and is an excellent tutorial for beginners. It is a book about the fundamentals of computer programming, data strustures, algorithms and logical thinking, not just a Java book. The only weakness (or respectively a plus) is that it is entirely in Bulgarian (sorry, no transaltions are available).
Ето няколко полезни линка, свързани с книгата:
Posted by nakov as news, java, blog at 4:45 AM EEST
Comments Off
Last Sunday I was given an invited talk in the Club “Stop and Think!” about writing open source books with a large team of 30 authors. This process is really a challenge because the authors are enthusiasts and they write for the good of the community. You are not their boss because you don’t pay them. My top recommendations about running such project are:
- Define the book contents, divide it on small enough chapters.
- Provide templates for each chapter with outline (headings and sub-headings up to level 3). templates should have well prepared styles (for consistent formatting), example text and TODOs.
- Prepare guidelines for the authors (written document, like a small book).
- Writing a book is a project -> manage it like any other project. Assign tasks and deadlines, make a schedule and track the authors.
- Risk management = small tasks for small ammount of time.
- Remove from the team authors that do not perform well (masured in deadlines and qiality).
The detailed presentation is available in SlideShare (in Bulgarian): http://www.slideshare.net/nakov/30-2255217.
If you prefer, download the PowerPoint presentation (Nakov-How-to-Write-a-Book-with-Team-of-30-Authors.ppt) and the additional materails (How-to-Write-a-Book-with-Team-of-30-Authors-Materials.zip).
Posted by nakov as news, blog at 1:35 AM EEST
Comments Off
Today I granted to the community (under MIT license) the source code of the most interesting algorithms designed for my PhD thesis (implemented in C#):
- MMEDR - algorithm for measuring weighted orthographic similarity between Bulgarian and Russian words taking into account some linguistically motivated Bulgarian-Russian correspondences (current supports Bulgarian and Russian only)
- SemSim - algorithm for measuring semantic similarity between words by searching in Google and analyzing the returned text snippets (currently supports Bulgarian, Russian and English)
- CrossSim - algorithm for measuring cross-lingual semantic similarity by searching in Google and analyzing the returned text snippets (currently supports Bulgarian and Russian only)
- FFExtract: algorithm for extracting false friends from parallel corpus by determining candidates through MMEDR algorithm and combining statistical and semantic evidence for distinguishing between cognates and false friends (currently supports Bulgarian and Russian only)
The project is titled TECFF (Toolkit for Extraction of Cognates and False Friends) and is available for public download from http://code.google.com/p/cognates-and-false-friends-tools/.
Posted by nakov as blog at 12:54 AM EEST
Comments Off
All Java and Java EE developers are invited to the unique for the Balkans and Eastern Europe conference on Java technologies called Java2Days. At the conference distinguished speakers will talk in Sofia about Java, Java EE 6, JBoss, EJB 3.1, Spring Framework, JPA, OSGi, GWT, JSF, jBPM, Wicket, JRockit, cloud computing and other hot technologies. Some of the speakers:
- Reza Rahman - independent Java EE consultant, co-author of the book “EJB 3 in Action”
- Mircea Markus - core developer and trainer at JBoss
- Bruno Bossola - agile coach at Vodafone Global and Java champion
- John Willis - CEO at Zabovo Corp., cloud computing expert
- Josh Long - enterprise architect, speaker, consultant, and author
For more information visit the conference official Web site: http://java2days.com/.
Posted by nakov as news, java, blog at 7:14 PM EEST
Comments Off
All .NET and Microsoft oriented developers are invited to DevReach 2009 conference - the premier conference for Microsoft technologies for the Balkans and Eastern Europe region. This year the conference attracts distinguished speakers who will deliver talks about Silverlight, WPF, ASP.NET 4.0, ASP.NET MVC, AJAX, IIS 7, Visual Studio 2010, SharePoint, SQL Server 2008, business intelligence, data access and ORM, LINQ, RESTful applications, WCF, WWF, .NET service bus, Scrum and many others. Some of the speakers:
- Chris Sells - Program Manager for the Business Platform Division Microsoft
- Luka Debeljak - CEE DPE Regional Technical Lead at Microsoft
- Kent Alstad - Microsoft ASP.NET MVP and principal at Strangeloop
- Stephen Forte - Microsoft Regional Director for NY
- Christian Weyer - Microsoft Regional Director and co-founder of thinktecture
- Tiberiu Covaci - INETA Country Leader for Sweden
- Hadi Hariri - Technical Lead iMeta Technologies
- Todd Anglin - Telerik Chief Technical Evangelist
- Richard Campbell - .NET Rocks and RunAs Radio
- Shawn Wildermuth - Microsoft MVP
For more information visit the DevReach conference official web site: http://www.devreach.com/.
Posted by nakov as .net, news, blog at 7:00 PM EEST
Comments Off
Today I presented a scientific publication about measuring modified orthographic similarity between Bulgarian and Russian words at the Workshop “Multilingual Resources, Technologies and Evaluation for Central and Eastern European Languages”, held in conjunction with the scientific conference RANLP’2009. The paper is titled “A Knowledge-Rich Approach to Measuring the Similarity between Bulgarian and Russian Words” and is a small part of my PhD thesis.
Abstract
We propose a novel knowledge-rich approach to measuring the similarity between a pair of words. The algorithm is tailored to Bulgarian and Russian and takes into account the orthographic and the phonetic correspondences between the two Slavic languages: it combines lemmatization, hand-crafted transformation rules, and weighted Levenshtein distance. The experimental results show an 11-pt interpolated average precision of 90.58%, which represents a significant improvement over two classic rivaling approaches.
Download
Download the article: RANLP2009-Workshop-Nakov-Paskaleva-Nakov-MMEDR-Similarity-Bulgarian-Russian-Words.pdf
Download the presentation: RANLP-2009-Workshop-Nakov-Paskaleva-Nakov-MMEDR-Similarity-Bulgarian-Russian.ppt.
Posted by nakov as blog at 7:42 PM EEST
Comments Off