Monday, February 12, 2007

windows utilities

psexec is a useful tool to execute programs/commands on remote windows machines . psexec is part of a package called pstools that contains other useful tools.

In fact there are several useful utilities like tcpview similar to netstat but with a graphical interface, process explorer that is very useful to figure out which program has a particular file or directory open, hex2dec to convert hexadecimal to decimal and vice versa, and others.
For more information consult the microsoft Windows SysInternals webpage.

Labels:

debuging tcp/ip applications with netstat

When using the netstat command to debug tcp/ip applications is very useful to understand the behaviour of a TCP connection using the state diagram that displays the possible states and the transitions that happen between states since netstat displays current tcp/ip network connections and its states.

A reference to that diagram on line can be find following the link about Transmission Control Protocol
or rfc793.

Labels:

Thursday, October 12, 2006

depends.exe for Windows

Depends.exe is a free utility that can be run on a Windows executable or dll and builds a tree of all the modules the paths where they can be found, base address, version numbers, machine type. It also shows what functions are exported by the module and which of those functions are being called.

Why or when do you want to run it?

If you need to troubleshoot errors related to loading and executing any module on Windows.
It detects missing modules dlls, circular dependency errors and other errors.

Thursday, September 14, 2006

debugging tcp/ip applications tips

Some programs, tools, tips that I found usefull to debug tcp/ip applications:

-netstat command to see the display active tcp/ip connections and ports in each the computer is listening. Some usefull options are /a and /n

-ethereal network analyzer software once you know what are the ips and the ports you can observe the messages being exchanged for active connections

-write either a client or server using Python to reproduce and test fixes

-vmware can help too

Sunday, August 20, 2006

C++ must read books

So many things happened in these months that I've been without writing...

I was busy with some training, had family and friends visiting and staying with us, changed job.

Anyway I am back with some more after hours thoughts to share about different things that I found either interesting or useful.

If you are looking for C++ must read books look at the following link by the famous Scott Meyers that contains information about the 5 top C++ books to read.

http://www.artima.com/cppsource/top_cpp_books.html

I have read 3 of them and have one on my reading list:

  • The C++ Programming Language by Bjarne Stroup
  • Effective C++ by Scott Myers
  • Design Patterns by Erich Gamma and gang

The book on my reading list is:

  • Modern C++ Design by Andrei Alexandrescu


The C++ Programming Language is a great book for learning C++ and for having as a reference book.
The Effective C++ and More Effective C++ by Scott Meyers are fundamental books to understand the things you should not do when programming C++ and how it should be done
and why. It helps to master the C++ basics and to avoid common mistakes. The Design Patterns book is fundamental for every programmer. It teachs about a common problem/solution language talking about common problems and solutions and compromises.

This C++ site seems to be a great site for C++ developers. Check it out...

http://www.artima.com/cppsource

Friday, April 14, 2006

Another cool technical podcast

Security Now is another cool technical podcast that I enjoy to listem from time to time.
Check it out.

VMware addiction

I have been using VMware Workstation to run multiple operating systems in my PC without having to have 2 or 3 multiple boots to run different versions of Windows and Linux. It is easy to test multiple configurations. When I start working again and I turn on the PC I just go and recover my last system snapshot and everything is in the same state it was left. Also if I install something that messes up my system I just go and recover a previous snapshot and delete the messed up snapshot.

I am a big fan.

Tip:
If you are a developer like me increased the memory default settings (256MB) to 1024MB or 512MB and you will get better performance.

Tuesday, March 14, 2006

CSS Summary

CSS (Cascading style sheets) are used to separate content from presentation. CSS describe the presentation of a document written most of the times in HTML. CSS is used to define colors, fonts and layout.


A style sheet file consists of a list of rules.
Each rule consists of:

  • -one or more comma-separated selectors
  • -declaration block (a list of semicolon-separated declarations in curly braces)


In CSS, selectors are used to declare which elements a style applies to, a kind of match expression. Here are some examples of selector syntax:


  • All elements: that is, using the * selector

  • By element name: e.g. for all p or h2 elements

  • Descendants: e.g. for a elements that are descendants of li elements (e.g links inside lists) the selector is li a

  • class or id attributes: e.g. .class and/or #id for elements with class="class" or id="id"

  • Adjacent elements: e.g. for all p elements preceded by h2 elements, the selector would be h2 + p

  • Direct child element: e.g. for all span elements inside p, but no span elements deeper within the hierarchy, the selector would be p > span

  • By attribute:e.g. for all <input type="text"> the selector would be input[type="text"]





Each declaration consists of a property, a colon : and a value.

Example:

p {

font-family: "Garamond", serif;

}

h2 {

font-size: 110%;

color: red;

background: white;

}


To use a CSS style sheet created a file with the sytle sheet file with the rules and link it or import it using:

<link rel="stylesheet" href="example.css" type="text/css" >
<style type="text/css"> @import "example.css"</style>

For more information on CSS follow the link http://en.wikipedia.org/wiki/Cascading_Style_Sheets

HTML and Dynamic HTML

HTML is a markup language used for the creation of web pages. HTML is used to structure information, define headings, paragraphs, lists, tables, etc.

Markup element types:
  • Structural (h1, h2)
  • Presentational bold (b)
  • Hypertex Wikipedia (href)

For more information on HTML elements see http://en.wikipedia.org/wiki/HTML_element.

The document type definition:

All html documents should start with a DocType declaration and Document Type Definition.

Dynamic HTML or DHTML is a way of creating interactive (non-static) web pages by using a combination of HTML static, client-side scripting language such as Java-Script, CSS (Cascading style sheets) and the DOM (Document Object Model). More information about Dynamic HTML can be find by following the link http://en.wikipedia.org/wiki/Dynamic_HTML.




World Wide Web Basics


Htpp is a protocol to transmit information in the world wide web. It is a request/response protocol between the client and the server. The client is most of the times a web browser that issues a request to a server connecting to a particular port (by default the port is 80).
The server issues a response that contains a status and a message.
The request message consists of a request line, a header, a empty line and a optional message body.

The request line contains information about the:

  • request method
  • resource identifier
  • protocol

The request method is one of the following:

  • GET
  • HEAD
  • POST
  • DELETE
  • OTHERS

The resource identifier is a path or a path and a filename.

The headers are pairs of key: value separated. An example is "Accept-Language: en" .

The protocol version can be specified by HTTP/1.0 or HTTP/1.1 (current version).

Example:

The reply:

  • HTTP/1.1 200 OK
  • ...
  • Server:...
  • Content-Type: text/html
  • And the message

More detailed information can be found at wikipedia.

Free encyclopedia online

When you are looking for some word definition look in the wikipedia. It is a good place to start...

Saturday, February 25, 2006

Some cool technical podcasts

The Java Posse
JavaPolis
Software Engineering Radio
Zdot
Roumens's Weblog - NetBeans pod
Audible Ajax

Java Developer's Journal

JDJ a magazine that has some interesting articles about Java and Java World. Keep an eye on it. It is worth checking.

Core Servlets ans Java Server Pages

I am really enjoying the Core Servlets ans Java Server Pages .It's first edition is available online go check it.