Tuesday, April 5, 2011

What do your teachers teach you?? (Goddamn it!)

That's one question teacher Andrade (Business Intelligence Course), asked us today ( I added the "Goddamn it!" part =-D ). And  I just laughed it up, out of shame and irony because long ago I expected so much more from my Database Systems class.

Things I learned today:

  1. To systematize. Sometimes we call "to systematize"  to automatizing processes , but in fact we systematize something when we figure out the model that describes it  and only after that we automatize it.

  2. What does a model serves you for? To better understand the requirements; it's a basis for building information systems on top of it, to communicate with users, and it acts as a plan for developers. When building a model we don't care about technical or implementation details. The model has to have enough elements to form a good representation the entity requirements.

  3. Data Quality. Relevance is based on the context. Clarity. It's usual to make a glossary of terms with the client. Consistency. It's useful to make comparison table between terms (measure units, times, processes etc.) and its discrepancies and adopt one uniform term. Precision. Related to granularity (again, use always the same type of measure units)

  4. It's better to let the database manager to handle most of the data processing, because inside the database lays the business model, so this helps reduce errors. (The opposite approach is to process the data programmatically).

  5. What's an index? (this is the question that triggered this post's title). An index is a data structure that "copies" the values of a particular field, stores a pointer to the original record that value belongs to, then sorts those values and makes binary search (one of the fastest search you can do). The main issue here is that records are stored as linked list and you know how troublesome is looking up values in such structures. Indexing is only wise under limited circumstances, if not done properly you're wasting precious space!.

  6. The scheduler. This is the part of the database that decides in which way to perform a query so the spent time is minimal.

  7. Database statistics. When performed, they'll determine the access path to data that will produce less I/O operations in SELECT, UPDATE and DELETE operations. http://www.saptechies.com/faq-database-statistics/

  8. File system tweaking. Andrade told us about specific file system tweaking we can do in order to boost database performance, and guess what? It's not available in windows, stupid windows...


We learned a lot more but I just take notes on the things that go beyond the slides of the course.

  • I want my videogame to be multilingual, so  while playing with Layout Managers, buttons and other components,  I came up with this:


[caption id="attachment_193" align="aligncenter" width="141" caption="Chose your language"][/caption]

The code for this is as simple as it gets:

[sourcecode language="java"]

public class HelloMidlet extends javax.microedition.midlet.MIDlet {
public void startApp() {
Display.init(this);
Image deFlag = null;
Image mxFlag = null;
Image ukFlag = null;

try{
//setting the application theme
Resources r = Resources.open("/LWUITtheme.res");
UIManager.getInstance().setThemeProps(r.getTheme(r.getThemeResourceNames()[0]));
deFlag = Image.createImage("/deFlag.png").scaled(100, 50);
mxFlag = Image.createImage("/mxFlag.png").scaled(100, 50);
ukFlag = Image.createImage("/ukFlag.png").scaled(100, 50);
}
catch(java.io.IOException e){
System.out.println("Error al abrir el recurso");
}
Form f = new Form();
f.setTitle("Choose your language");
Button deFlagButton = new Button("Deutsch",deFlag);
Button ukFlagButton = new Button("English",ukFlag);
Button mxFlagButton = new Button("Español",mxFlag);
deFlagButton.setAlignment(Component.CENTER);
mxFlagButton.setAlignment(Component.CENTER);
ukFlagButton.setAlignment(Component.CENTER);
f.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
f.addComponent(mxFlagButton);
f.addComponent(ukFlagButton);
f.addComponent(deFlagButton);
f.show();
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
}

[/sourcecode]

  • I was trying really hard to make svg images appear but just couldn't. I like svg images because they have a great quality independently of screen resolutions. I'll keep trying tomorrow.

  • I need also to figure out the way to get the screen width and height to resize my images accordingly.

  • Java provides a simple way to use localization, I'll implement the basis for it tomorrow.

  • I'll code the heapsort tomorrow as well.

No comments:

Post a Comment