Nicko think on software, web, ideas

December 27, 2007

Removing Visual Studio 2005 with SP1

Filed under: Search and Found, think&think — Tags: , — Nicko Satria Utama @ 5:50 pm

Today I am stuck while I use Visual Studio 2005 to create a web application. I don’t know why;when I create or open an aspx file (not the code behind .cs), view markup or view designer, the visual studio 2005 show an error “I have to choose to close the Visual Studio 2005 and send the error report to the microsoft”.

It has happened many times since I work today. I try many time like reinstalling Visual Studio 2005 SP1, Deleting Schema in the Schema directory, Reinstalling .NET Framework 2.0 and .net Framework 2.0 with SP1 but it is not worked.

I try to repair and reinstalled from the image cd (from network) but it doesn’t work it. It needs the .msi of Visual Studio 2005 but I don’t find it.

The last thing I try to uninstall the product using Add-Remove program but It doesn’t work.

The VERY last thing is to removing Visual Studio 2005 manually. Hard work.  But now it is worked.

December 17, 2007

At last no need to activate control in IE

Filed under: Search and Found — Nicko Satria Utama @ 2:14 pm

When I use Internet Explorer, Some controls such as Macromedia flash needs to be clicked so I can access it. It is annoying.  In KB 945007 , I found article that I don’t need to be clicked again. You can go to http://support.microsoft.com/kb/945007

The problem is how to make the user download this update ? or I have to inform the user when I make a web site about this ?

December 13, 2007

Prepare for VS 2008

Filed under: think&think — Nicko Satria Utama @ 7:39 pm

Today, Visual Studio 2008 has launched to market. There are many feature added to the IDE like WPF, WCF, WF (3 pillars can be used in VS 2005), LinQ, Javascript debugger, and many others. It needs more hardware power to develop it.

Real hardware requirement (in my case):

  • minimum Intel Pentium D 3 Ghz or Dual Core 3.0 or Core 2 Duo 2 Ghz
  • minimum RAM 2 GB ( I already try VS 2008 Beta2 on 1 GB runs slower)
  • minimum harddisk  160 GB (It is difficult to get 80 GB in my city now)
  • minimum VGA NVIDIA 7300 with 256 MB (I use NVIDIA 7300 GT 512 MB with Vista graphics index of 4.7)
  • minimum resolution is 1280 x 1024. Working areas are smaller in 1024 x 768. (I use 1600 x 1200 with High DPI 120 dpi)

Real software requirement (in my case)

  • minimum windows vista business
  • minimum office 2003 (Excel 2007 still error on calculation)
  • I use subversion as source control
  • latest windows SDK (until today I only have SDK version 6.0.xxx; still wait the SDK latest version)
  • free Paint.NET to draw or manipulate picture
  • Sql Server 2005 Express Edition with SP2 (download)
  • Supported MySQL to Vista with OleDB/ODBC driver installed, Administrator and Query browser required
  • IBM DB2 Express C, free version of DB2 that support on Visual Studio  2005 (hope they launch for Visual Studio 2008 soon)
  • Oracle DB 11g
  • Antivirus software either is paid like symantec or free like AVG

So I installed the computer clean with Vista. After that I ghost the partition as a backup and then install the application. When installation all application has finished, I ghost again the installation.

Warnet– before rent it

Filed under: Peoples, Search and Found — Tags: , — Nicko Satria Utama @ 3:55 pm

Since internet connection in Indonesia so slow and so expensive, I rent a internet cafe (warnet) to access internet. There are many warnet in Surabaya; from the cheapest one (Rp 1.500,00/hour) until the expensive (Rp 6.000,00/hour) based on the facility you like. Some good.. some bad….

Most engineer / cashier don’t care to the customer and the computer. Some computers installed with annoying application and  non standard setting.

So if I want to warnet, I always bring some application that suites on the USB sticks.

  • Firefox portable with extension  : noscript, adblock plus, fasterfox, FFClickOnce, Firebug, flashblock, furl, mozilla accessibility, Unplug
  • Thunderbird Portable for my POP3 emails
  • Pidgin Portable for chat with MSN, Yahoo
  • WebCopier for copy whole web site.
  • Windows WL Writer to write my blog.
  • Limewire and micro torrent for peer to peer
  • Free AVG for small defender against virus
  • Process Explorer to look at the running application instance. If there is a suspicious application, I will terminate it. Most warnet will disable Task Manager.
  • Portable or free registry editor…

All the portable software I configure in my computer first with setting I wants and zipped it, So I just unzipped there.  Just make sure the computer installed with Windows 2000 with SP3 or above; and Windows XP SP2; or later Windows. I have trouble with warnet using Windows 98 or ME. I always avoid warnet that using Linux, many trouble :( .

If it is possible, I will search warnet with more than 512 MB of RAM, so I can installed with Java runtime or .NET 2.0/3.0/3.5 runtime so I can make the software using free version of IDE (Eclipse, Netbeans, VS Express)

October 17, 2007

Get XML from Embedded Resources

Filed under: Code and Code — Nicko Satria Utama @ 9:43 am

For some situation, I need to save data or configuration as a default to the DLL and EXE files. First I make XML file in Visual Studio and fill the contents. After that set XML file’s Build Action to Embedded Resource. After compiling and produce DLL or EXE you can access the resources using the methods below.

/// <summary>
/// Get XML from Embedded Resources
/// </summary>
/// <returns></returns>
public XmlReader GetXmlConfig()
{

XmlReader xmlReader = null;
Assembly asm = Assembly.LoadFrom(“myLibrary.dll”);
if (asm != null)
{

string[] strArr = asm.GetManifestResourceNames();
if (strArr != null && strArr.Length > 0)

{

foreach (string str in strArr)
{

if (str.EndsWith(“MyXML.xml”))
{

Stream stream = asm.GetManifestResourceStream(str);
xmlReader = XmlReader.Create(stream);

}

}

}

} return xmlReader;

}

October 2, 2007

Short Meeting at THR

Filed under: Code and Code, Peoples — Nicko Satria Utama @ 10:12 pm

Saturday I went to I met Salamun, Cipto and Eriawan there. It was nice since we talked freely without any interruption and problem.

We talk everything on programming approach, how to handle the data, how to write the code etc. We have some conclusion on how bad and good programming.

  • Always thinks keep codes long enough in one methods if only called once.
    For example if have methods RunForDataX that run sql statement to get data and manipulate it.
    public void RunForDataX()
    {
    // — 200 lines –
    }
    It is hard to maintain the long codes so I like to split up into methods with shorter codes.
  • Loading unnecessary data and code to memory and manipulating on the fly. It is expensive for desktop and web application even you deploy on server farm.
  • Bad class or library design. Some classes have no design at all or not use defacto pattern/guide. Some has  implement it wrong. It will increase maintenance cost.
  • Don’t know when it will freeze. Any new improvement and feature added but don’t know when it has to be freeze and deliver the products.
  • Build in the wrong way, wrong library and wrong tools.
  • Misuse and overuse the code or even the technology.
  • Make unnecessary object dependency and sometimes calling some methods in the sequentially. Most of the codes is too tight coupling.

September 4, 2007

Readable Primary Key

Filed under: think&think — Nicko Satria Utama @ 11:15 am

Most of the database designer, programmers or system analyst knows the importance of primary key. It gives the row unique identify so there is no 2 or more rows in the table has the same value in those column.

Some programmers make the primary key only a sequence of number like 1 to maximum number in the PK column using auto increment from the database itself or auto increment from the code. It is good since the database will handle the uniqueness; but it will loose the meaning of the data.

The other reason data will grow fast so the auto increment will loose its functionality.

for example:

PK using integer datatype and auto increment. If the data will grow more than 4 billion records, The programmer or database developer will change to higher datatype like long integer. It is not easy to convert lowest datatype to higher datatype since some RDBMS need recreate the tables and refill again.

PK using string datatype with specific format and length. We can easily predict the data and its growth. With the format of the PK I can easily read the meaning; like 20070112Axx; the record was built on 12 January 2007. It is easy to convert since it is just a string.

August 22, 2007

Restarting Windows Without Restarting Your PC (Vista or XP)

Filed under: Digg stories — Nicko Satria Utama @ 12:24 pm

Sometimes, you need to reboot Windows (e.g. when installing new software), but there is no need to restart BIOS, too. However, the default is to reboot both. (That
’s called doing a “cold boot,” rather than a “warm boot.”) There’s a trick that works on both XP and Vista to get it to do a warm boot instead, thus saving you 30 seconds per cycle.

read more | digg story

VS 2005 HotFix

Filed under: Peoples, Search and Found — Nicko Satria Utama @ 10:59 am

The Collection of VS 2005 HotFix from Microsoft Connect

Please Use Microsoft Passport to log in :)

Based on URL from Eriawan Blogs and I follow it

URL: http://connect.microsoft.com/VisualStudio/content/content.aspx?ContentID=3705

Hv fun

July 27, 2007

Web 2.0 API that I subscribe

Filed under: think&think — Nicko Satria Utama @ 11:04 pm

I want to build a an application that can connect everything on the web

It can be real application like business or community :) . So I need to register some of them

July 24, 2007

Simple Unified Process

Filed under: Uncategorized — Nicko Satria Utama @ 5:18 pm

I found unified process web sites that match for the education.

http://www.yoopeedoo.org

I think it is cool. You can read it. For students it is enough.

tightly coupled. it is bad.

Filed under: think&think — Nicko Satria Utama @ 12:29 pm

Some library or applications are tightly coupled by design. They are dependent on each other component so it is not easy to use in the other projects. Sometimes the library needs specific control like Component One or others, and cannot using native control .  Phew.

It makes me sad since I have to buy the control and the library just to make sure the project done and quickly deployed to the customer.

Just now I still develop controls and library so I can  make it on every project; and then I can using native control or downloadable control.

Loading Image from website

Filed under: Code and Code, think&think — Nicko Satria Utama @ 12:01 pm

 In the System.Drawing, Image can only get from the file and don’t have methods to download the images from the internet. The code below is getting from the url. First define the url. and download the data using stream.

private Image LoadFromURL(string url)
{
Image image = null;
MemoryStream ms = null;
byte[] data = null;
Uri uri = new Uri(url,UriKind.RelativeOrAbsolute);
WebClient webClient = new WebClient();
data = webClient.DownloadData(uri);
ms = new MemoryStream(data);
if (ms != null)
{
image = Image.FromStream(ms);
}
return image;
}

June 5, 2007

Problems using 3rd party controls

Filed under: Code and Code, concept, think&think — Nicko Satria Utama @ 6:56 pm

Some forums said that I should use 3rd party controls to accelerate development process because of the reusable. It can be problems since I don’t know the controls works. I just know the features of the controls and using it. Some of them don’t have clear documentation and manuals.

Most of them claims the product best and complaint with some technology or other vendor controls. In fact they cannot claim 100% works. For examples the controls has feature of persistence and ajax / microsoft ajax technology. When they assemble into the HTML pages, There are many errors because of the javascript or callback.

To decrease the problem, use 3rd party controls wise.

Some controls is very expensive to buy although they have “sounds good” license like developer license, seat license. Some controls will open their source, but who has a time to analyze the source and add functionality their ? Wait for major or minor release ? Forget it. I have the job to finish quickly and deliver it to customer.

Using from the framework or base control is nice idea. We can do what we want like encapsulate or extending the functionality. It will come the price for time to develop the control to provide the features I want.

Using open source or free 3rd control is not bad.  Since sometimes it is not really free. Some features is not complete and maybe bugs. But we still can extending the functionality or repair bugs step by step.

May 20, 2007

Visual Foxpro is discontinued!

Filed under: Uncategorized — Nicko Satria Utama @ 4:25 pm

Visual Foxpro is discontinued now. There is no visual foxpro 10 on the future release. Developer and organization should move to new platform such as to Microsoft.NET or Java.

You can see in the visual foxpro roadmap in http://msdn2.microsoft.com/en-us/vfoxpro/bb190293.aspx

May 15, 2007

Browsing ControlID on Properties

Filed under: Code and Code, think&think — Nicko Satria Utama @ 12:14 pm

I need to know what kind of control that are available on my form when I design complex control. First make the property and give attribute TypeConverter with type of ConverterID and IDReferenceProperty to WebControl

For example:
[TypeConverter(typeof(ControlIDConverter)), IDReferenceProperty(typeof(WebControl))]
public string TargetControlID
{
get { return this.targetControlID; }
set { this.targetControlID= value; }
}
private string targetControlID;

After build, drag the control from the toolbox to web form and the property will show up with the list of control ID on the form.

May 5, 2007

Faster to develop software

Filed under: think&think — Nicko Satria Utama @ 12:17 pm

I start to think how to develop a solution faster than before. Most of the time I usually work on making classes to handle database, UI, relations between data and UI, security (like who can use this function) and generate report.

Usually I develop using pure library or framework like pure .NET or Java base class especially when I make software for small company. The way I do programming is OK when I have few jobs and much time, otherwise not OK.

While developing on .NET I use:

ORM or Library:

UI:

I don’t use third party control since it is expensive for me.

While developing on Java I use:

ORM or Library:

Until today I don’t use it.

UI:

Native java or Eclipse UI

While developing on PHP I use:

ORM or Library:

I don’t use third party, build myself. Since most of the customer use PHP 4.3.x or 4.4.x and a few customer using PHP 5.x

UI:

By hand. Until now I don’t know what UI controls.

Database and Business Object – why?

Filed under: concept — Nicko Satria Utama @ 10:58 am

Most programmer I know still confuse how to code well, especially they want to do with the data. They usually put some “accessing data” code on the UI like (on C#):

BtnGetOrder_Click(…) // some UI event
{

String connStr = “SomeConnectionString”;
String sqlStr = “SomeSqlString”;
SqlConnection connection = new SqlConnection(connStr);
connection.open();
SqlCommand command = new SqlCommand(sqlStr , connection);
SqlDataReader reader = command.ExecuteReader();
while (reader.Read())

{
// display result on the screen
}

}

The problem occurs when the UI changes, many codes changes too; and make the maintenance expensive. It is not easy to find a code and modify them when there are more than 200 line of codes in the methods. This styles usually use for quick samples or student.

Some forums or books suggest that it will use 1 or more classes contain many methods and properties for accessing data. UI methods just instantiate and using them. This style of coding technique is better so I can separate between UI and the logic. It might be a problem when I want to maintain the code or recreate/rebuild the code, I get million of code to find.

Business object offers more than just encapsulate methods and property into the class but give the meaning of the class. Most of business object is a representation of tables from database and the methods just manipulate its state. There are classes to handle saving, retrieving from database; and make relations between business object that represent relations in the table.

April 22, 2007

Step by step to learn into programming

Filed under: concept — Nicko Satria Utama @ 4:30 am

Many people around me always said computer is difficult thing to do. Especially when they want to learn how to programming. Here is a little step to learn. I don’t have to study to expensive university or course. Remember that the only purpose of programming is Solve the Problem.

First of all choose the operating system and platform to study. For easy way I use Windows and Visual Studio. I can use either C/C++, VB, C# or other language. Don’t forget to install MSDN as documentation or others. See the language reference for the syntax.

Then try to codes and show on the screen like hello world or something. Don’t worry it looks ugly. Try to understand on looping, branching, subprogram, integral type like what is integer, char or float; logic and a little about input/output. Don’t worry on object oriented mechanism like inheritence, type casting :) . Make a little code to solve a little problem.
Example :
I need a little program to get some data about party. The program can register who is attended and report it. The program can be done when user choose exit.

OK. The program is already built, but it strange that is only like that. So I want to add capabilities like sorting by name or searching by name. So I learn basic data structures like stack, queue and list/linkedlist, sorting (for easy way try to understand bubble sort) and search (just easy like binary search). I add the program above.
I need who is attended to be sort by name and I can search it by name.

Next steps I need to understand OOP. There are many books tells about it. I just take concept of inheritence, polymorphism, encapsulation, aggregation, composition, abstraction, class, object, method, and binding. The program above can be rewrite to many class that represent the object. The problem is what object do and what object can communicate each other. Just a simple example I have a class person that has attribute of name and a class of attender that inherit from person that has attribute like the attender is a family. The class need communicate to party class.

Next steps I can learn about building user interface for the someone who use the program. It is used as a input from user and output to user. The program can be redesign by just dropping some label, textbox, and button. I don’t need complex control now such as report control like crystal report or sql server report.

When the computer is shutdown, the data is gone; So I need to store the data. I learn a little about database. I can use many database software like simple MS Access or SQL Server; or I can use csv file (comma separated value). There are basic concept s of database need to be understood like table, field, record, domain/field type, view and basic sql syntax(create table, select without join, insert, update and delete) . I need connection string to connect from the program to database.

From here I can make a small program to solve the problem.

April 20, 2007

My Computer

Filed under: think&think — Nicko Satria Utama @ 12:07 am

Software and tools that is needed to install on the computer:

OS
———-
I use Windows XP SP2 or Windows Vista as my operating system. I need Windows XP to develop using old system and Vista for new system.

IDE / Software Development tools / SDK
—————————————–

  • I use Visual Studio 2005 to develop on .NET.
  • I install Windows SDK 6.x.xx to develop on Vista. Until now it is compatible on Visual Studio 2005. I use WPF, WCF and WF :) . Windows Cardspace is not needed now, maybe in the future.
  • I install extension for Visual Studio 2005
  • I install MSDN for documentation (complete)
  • I use netbeans 5.5 and Eclipse 3.2 to develop Java
  • I install JDK 6.0 and its documentation
  • I install PHP 5 on IIS to develop PHP
  • I use subversion as my SCM and tortoise as subversion client.

Database
———–

  • MS SQL Server 2005 Express Edition,
  • Oracle 10g Express (only needed), it is very heavy
  • My SQL 5
  • IBM DB2 8.1.6 (support .NET)
  • Connector to .NET and drivers for Java

Tools
—————–
Ms Office

for boring time
———————–
Games

Older Posts »

Blog at WordPress.com.