The transaction log for database is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases
09-10-2012 I got this error today for one of my test databases. Following are the steps to solve this. Step 1 The error message gives a hint to look in the log_reuse_wait_desc column in sys.databases table. So we will just do it. [sourcecode lan...

quote
If you care about others without thinking about yourself, then God will care about you. - Cassian Menol Razeek

ILT - Divide and Conquer Strategy - Why it is so powerful
08/02/2013 Divide and Conquer is a very interesting and effective strategy that has been used by many technical experts, leaders, mangers, and warriors through out the world for many years. Following is a story of the famous Sri Lankan king Dutugem...

How to Control a Ton of Inputs using Shift Registers! - YouTube
I have always been fascinated by how circuits manage many inputs and outputs without the need of hundreds of i/o pins... This shows how you can listen to many inputs by using a very few pins. Video credit: Kevin Darrah (Youtube). https://w...

Use of Nullable ?? Operator in C#
20-07-2012 Use ?? operator to tell the compiler how to assign a null-able variable to a non-null-able variable. // ?? operator example. int? x = null; // y = x, unless x is null, in which case y = -1. int y = x ?? -...

Using DispatcherTimer To Create A Timer In WPF
09-03-2012 // // WPF doesn't have a straightforward Timer control that you can drag and drop from the Toolbox. However, ther's still a straightforward easy way to implement this. You can use the provided System.Windows.Threading.DispatcherTimer ...


The world won't feel when you die, only your family will. Make sure you treat them best while you can. - Cassian Menol Razeek


Luck, good or bad is just the Irrational outer peel; take it off to see all Rational seeds that brought luck - Cassian Menol Razeek

Software Architecture Posts


ILT - AWordADay - Utopia
Utopia : Refers to an ideal community or a society which possesses ideal (perfect) social, political and legal systems. History: The word was taken from the book written by Sir Thomas More (in 1516), called Utopia (a Greek word) which explains a fic...

How to auto save the data table in memory into database?
2010-04-01 We frequently get to fetch data from the database, update them and then write them back to the database. Most of the time we only have to write them back as individual records. How about updating a whole database table in the memory ...

ILT - What's the Common Name for Institutes Similar to Banks that Allow You to Save or Deposit Money?
21-08-2012 Common name for institutes similar to banks or building societies that allow you to save or deposit your money is – Depository Answer : Depository The word Repository is also a good candidate but find out below why it isn't the most a...

Using Short-Circuit Condition Evaluation in VB using AndAlso and OrElse
02-07-2012 Normally, a programming language stops evaluating a composite condition when it finds one of following scenarios. (Condition 1) AND (Condition 2) Since the above composite condition to evaluate to true, both condition 1 and condition 2 ...

XSD validation for integer - How to allow empty values for integer while limiting value range (ILT)
19-06-2013 How to write XSD to validate an integer field so that only a range of values and empty tags are allowed. Example: I wanted to allow any value between -1 and 999 and also had to allow empty tags for my XML tag. Use of  nillable="true"...

Unable to cast COM object of type error {6D5140C1-7436-11CE-8034-00AA006009FA}
08-08-2012 I got this error today from SQL Server Management Studio. It occurred when I was trying to brows databases by expanding the "Databases" folder in the SQL Server Management Studio navigation tree. Unable to cast COM object of type 'System...

Posted in General | Comments Off on

Books I have read since the beginning of 2016

These are the books I have read (or listened to their audio counterparts) since the beginning of 2016.

I am not going to write my opinion about each of these books, instead I hope you too trust the majority of the people from around the world who have recommended these great books, like I did before choosing each of these books.

2016/01/05 ~ 2016/01/13

Book cover image.

Oversubscribed by Daniel Priestley

Oversubscribed: How to Get People Lining Up to Do Business with You Paperback
by Daniel Priestley

 

 

 

 

 

 

 

2016/01/14 ~ 2016/01/21

Book front cover image

Dreams from my father by U.S. President Barack Obama

Dreams from My Father: A Story of Race and Inheritance
by U.S. President Barack Obama

 

 

 

 

 

 

 

2016/01/21 ~ 2016/01/26

Book cover page.

Stop Talking Start Doing By : Shaa Wasmund, Richard Newton

Stop Talking Start Doing
by Shaa Wasmund, and Richard Newton

 

 

 

 

 

 

 

 
2016/01/26 ~ 2016/02/05

Book cover - Do Less, Get More by Sháá Wasmund

Do Less, Get More, by Sháá Wasmund

Do less and get more
by Shaa Wasmund, and Richard Newton
 

 

 

 

 

 

 

 
2016/02/05 ~ 2016/02/10

Book cover - Tribes by Seth Godin

Tribes by Seth Godin

Tribes
by Seth Godin
 

 

 

 

 

 

 

 

Currently Reading…

2016/02/10 ~ 

Book cover - Quiet: The Power of Introverts in a World That Can't Stop Talking by Susan Cain

Quiet: The Power of Introverts in a World That Can’t Stop Talking by Susan Cain

Quiet: The Power of Introverts in a World That Can’t Stop Talking
by Susan Cain

Posted in Advices, General | Leave a comment

ILT: [Solved] Nexus 5 Randomly Restarting After Upgrading to Marshmallow

One night I allowed my Nexus 5 to upgrade to the latest Android version (Marshmallow) but from next morning my phone was behaving very strangely.

It kept restarting randomly and became almost useless and completely unreliable.

 

The Problem

The problem seemed to be related to battery calibration information. Upgrading to Marshmallow somehow corrupted or changed this information making the phone unaware of its accurate battery state.

 

The Solution

Following these steps cured my phone.

  1. Use your phone until it drains the battery and shuts down.
  2. Keep starting the phone to make sure you drain all of the remaining battery charge. You don’t need to worry about the amount of charge that the phone tries to preserve. Just do your best as a regular user to drain the battery. Don’t try advanced stuff.
  3. When the phone is off connect your charger (A/C adapter is recommended over USB) and let the phone charge to full amount without starting the phone.
    You can check this by checking the charging indicator that is shown when you briefly press the power button. DO NOT start the phone.
  4. When the battery indicator shows a full battery, start the phone.
  5. When started check the battery status on the top of the screen. If it is NOT very close to 100% (97% ~  99% should be fine) then turn off the phone and connect to the charger (step 3).
  6. Keep repeating steps 3~5 until you are happy the phone is charged to its maximum capacity. This may be less than 100% depending the quality of the battery.
  7. Then unplug the charger and keep using the phone until it’s fully drained. Do not charge the phone before the battery is fully drained.

Continue above steps several times over a few days and this will solve the problem. It worked like charm for my phone.

 

Posted in General | Leave a comment

How Software Engineers Became Software Developers

2015-09-29

This article looks at how and why modern software projects easily become messy and extremely convoluted. This article should not be understood as against new concepts but as a promoter of software engineering education, skills, and experience that allows engineers to make rational decisions to choose when a concept should be practiced.

The History

Software development (programming) was always a sub category of software engineering. However, over the last decade, software development was pretty much forcefully divorced from software engineering.

Why?

It is human nature to make things easy for everyone. In addition to this a lot of money was invested into software related projects making everyone wanting to become a software developer.

But everyone didn’t want to go through the hard work of serious education and then starting from the bottom of the ladder to gain experience. it was not fun.

So software development technologies became very simple and the need to have proper education in IT was taken down as a compulsory qualification to become involved in serious software engineering projects.

This created a massive boom in numbers of software engineers which also resulted in a large boom in supporting services for this large crowd.

While many companies stepped forward to provide educational and other services for this crowd, more experienced already established Software Engineers became technical writers. The concept of blog and blogging was boosted by potential advertising revenue.

Soon there was a great competition among these service companies and bloggers who basically had to bring in new and unique articles (resources) to keep their businesses, websites, and blogs popular.

The Crown went to Cool from Practical

For many years software engineering (like any other engineering discipline) was practiced with main focus on providing practical and reliable solutions.

This obviously required a lot of background knowledge and experience and there was not a lot of money to be made for the booming “developer support” industry.

So the supporting industry started creating new libraries and tools to make developers life easy. The most talked about topic in the industry became “the next helpful library or tool” that would reduce developer workload.

Mushrooming Concepts

* mushrooms just pop up randomly Reliability, stability, and logic are not concerns for mushrooms. They just pop up overnight.

The critical issue was that in addition to specific tools and libraries, some experienced bloggers and companies started creating their own flavors of established concepts.

As of now, you can see many new concepts arriving at the Internet every night.

Basically, everything that an experienced developer do to implement a known concept would be written on their blogs as if it’s a new concept and will be called cooler than the original concept it inherits.

The next morning all blindly following developers will read about this new thing and do their best to implement it on their projects because it is the cool thing to do.

Mushroom Filter

While the more experienced and educated engineers had the skill set to understand and decide when to use these new branched “cool” concepts, the large potion of “software developers” do not have that critical knowledge or relevant experience to make such decisions.

Every Pie is a Mushroom Pie

So the unfortunate result we see is that eventually this coolness took over. All semi-skilled developers blindly follow whatever they read on the Internet.

Then they put pressure on the management to bring all of these cool stuff into the projects they are working on.

This is why most of the projects you see today look nothing better than the inside of a badly made mushroom pie.

Posted in Practical Software Engineering, Software Architecture, Software Engineering Concepts | Leave a comment

Using sqlpackage.exe parameters and properties to publish your db with less hassle

2015-09-25

This article is for anyone who already knows how to use sqlpackage.exe. Visit the Microsoft link at the bottom to learn about sqlpackage.exe usage.

Where I work we use sqlpackage.exe to deploy our database snapshots (DACPACs) to various locations.

Since I have started to use this I faced several problems as the script was trying to make changes to the target database.

There were two main problems I faced:

  1. The main reason was that the script would not (by default) ignore data loses. It will normally break and error when it detects a data loss.
  2. The script does not (by default) rollback everything when it aborts the script (e.g. when it detects data losses).
    I had real bad situations when the script failed half-way through and left a lot of changes it made till it decided to abort.
    I had to restore the db from a backup and go through the whole thing again.

So I found these settings/switches you can use to instruct sqlpackage.exe to get around above issues.

  • Ignore data losses and continue
    /p:BlockOnPossibleDataLoss=False
    Specifies whether the publish episode is terminated if the publish operation might cause data loss.

    Set this to to ‘true’ and the resulting script will not abort when it detects data losses

  • /p:IncludeTransactionalScripts=True
    Specifies whether to use transactional statements wherever possible when you publish to a database.

    Set this flag to true and sqlpackage.exe will do its best to use transactions as much as possible.
    This will make sure that you will not end-up with a mess when the script fails.

There are many other useful properties provided by this tool.

for example, you can use /p:GenerateSmartDefaults=True to get sqlpackage.exe to generate default values for new columns that don’t allow nulls.

Read the below link for the full set of options you can use.

Source:
https://msdn.microsoft.com/en-US/library/hh550080(v=vs.103).aspx

Posted in SQL Server | Leave a comment

See the good and go for the best

See the good and go for the best   –  Cassian Menol Razeek

Posted in Quotes | Leave a comment

Crosscutting concerns (in software design)

2015-09-22

In software designing crosscutting concerns are concerns (requirements) that span over many layers (tiers) of your application.

Generally, the majority of the application functionality will be arranged in tiers and there will be some functionalities (examples below) that would span across those layers. these are crosscutting concerns.

e.g.

  • Authorization
  • Caching
  • Exception handling

It is important to consider how crosscutting concerns are facilitated at the design stage to avoid untidy and unreadable solutions.

This Microsoft article explains the topic further and also explains methods to handle common crosscutting concerns.

Posted in Software Architecture | Leave a comment

You need a 64bit text editor to open IIS config files on a 64bit computer

18/09/2015

If you wanted to open or edit IIS 7+ config files on a 64bit computer and if you try to use an editor like 32bit notepad++ then you would get a random error from windows.

The error I received was “The operation could not be completed. Unspecified error”.

Well, it turns out the reason behind this not very helpful error is that you cannot open these files using 32bit editor.

Simply use windows notepad or any other 64bit text editor.

Source: http://stackoverflow.com/questions/8635884/iis7-settings-file-locations

Posted in Web Development | Leave a comment

Browser and length independent CSV download code

17-09-2015

Downloading a csv string as a file on browser can be troublesome. Some techniques don’t work for very long CSV strings and some techniques only work on some browsers.

Below code is tested on Internet Explorer 11, Firefox 27.0.1, and Chrome 45.0.2454.93 m

And you can extend the code (where it alerts user that their browser isn’t compatible) to support more browsers.

Please comment if you do so, it will help others.


var csvString = your csv string;
var blob = new Blob([csvString], { type: 'text/csv;charset=utf-8;' });
if (navigator.msSaveBlob)
{ // IE 10+
navigator.msSaveBlob(blob, fileName);
}
else
{
var link = document.createElement("a");
if (link.download !== undefined)
{ // feature detection
// Browsers that support HTML5 download attribute
var url = URL.createObjectURL(blob);
link.setAttribute("href", url);
link.setAttribute("download", fileName);
link.style.visibility = 'hidden';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
else
{
// extend support for additional browsers here.
alert('Sorry, your browser does not support this export. Please contact support');
}
}

Sources:
http://stackoverflow.com/questions/27115748/download-attribute-not-working-in-firefox
http://blog.eliacontini.info/post/79860720828/export-to-csv-using-javascript-and-the-download

Posted in Web Development | Tagged , | Leave a comment

Protect your (software) architecture

09-10-2015

The most common problem I have seen in software projects that don’t have a responsible, capable, and experienced architect is that those projects tend to be very messy.

Most such projects are filled with pretty much all technologies and libraries that were popular during the projects life time.

The main reason behind this problem is:

Software developers get blown away by the overwhelming amount of new products that reaches the industry everyday.

Recent booms in software industry has made many software library vendors as well as software related writers who promotes these new libraries and products.

They talk about “what” but hide “where” and “when”
For some reason (I believe it’s the competition among them) these technical writers (a.k.a. bloggers, geeks, etc…) fail to include thorough information about WHERE and WHEN each concept or library can make an improvement to a software project.

The only message you can see in most sites and reviews is, “hey, this is a really cool library and you should use it”.

Most developers fall in:
According to my experience most developers, regardless of their technical expertise, have not trained themselves on decision making skills.

Therefore developers are under constant pressure to implement these “cool stuff” into their projects.

This is where you come in:
As a technical leader it is important that you maintain an open atmosphere in your team encouraging your developers to bring in ideas and new suggestions to use new things.

At the same time, as a strong architect you need to measure all potential benefits of these new suggestions and make a judgement with respect to following factors:

  1. Implementation cost – how much effort will it cost to introduce this.
  2. Validity – validate if your project would actually benefit from this change or if the benefits are minuscule, or even simply theoretical.

Your past experience should indicate whether it’s a good idea by conceptually applying it to your project.

The deference between an architect and a skilled developer is that the architect can visualize implementations and changes without having to try and fail.

Know how to say No!
It is important that you know how to explain-away wrong suggestions without making your important developers disappointed.

Posted in Software Architecture | Leave a comment

Always on top web browser

9-9-2015

Today I wanted to watch an online video while working on other windows but couldn’t get my browser to do it.

After failing with recommended solutions such as browser extensions I thought to quickly bring together a little browser using .Net.

I built this as a windows application (C#) and didn’t go for WPF to keeps things simple.

This is very simple and uses the off-the-shelf web browser tool in windows application tool box (Visual Studio).

I have attached the solution as well as the executable as separate downloads.

Feel free to further implement this and please let us know how you get on.

Screenshot:

always on top web browser

 

 

 

 

 

 

 

 

Download links:

Important: password to open archives : aabc

Executable: always on top web browser

Source code: browser

Hope this helps someone!

Menol

Posted in C#.Net, Products | Leave a comment