nulls and three value logic by C.J. Date

bkt_nulls_three_valued_logic

Summary: beware of nulls, they can surprise you

So far, this one is the best out of the five in the series.

nulls are painfull in db world. No matter how you define them (null, unknown, nothing at all). You can always use something that means – “missing value” – let it be: “sysmiss”, 999, “NULL”, 0. But there is still a problem. And that’s the purpose of this video, to show you how nulls can mess around with your data. You will learn how to become more suspicious in terms of results that you get from sql queries involving nulls.

Pay attention that this video will not provide you with definite answer on how to solve the problem of nulls. It is nither the sql tutorial. It’s rather a smoke sign indicating the problem.

There is, however one remark that make me think “come on, that’s not the proper way of giving the argument”. When C.J. Date discusses arguments against null defenders he jumps into “maybe” logic which stands in quite contradiction to what he defends over the whole course of the lecture.

Anyway, definitely worth watching.

Product page:

O’Reilly (video): Nulls, Three-Valued Logic, and Missing Information

tcsh – keeping your prompt always up to date

In case you want to put some variable’s value inside tcsh prompt you should consider using precmd in order to keep it updated. Inside your ~/.login put following code

alias precmd 'source ~/bin/prompt.sh'

Inside ~/bin/prompt.sh you can put any definition of prompt

set prompt="ā”Œ[%n@%m variable=${ENV_VAR}]\nā””[%~] "

If you use precmd you will keep the value of ENV_VAR always updated in the prompt.

You may also want to change default “cd” behavior: tcsh + pushd + cd ā€“ very convenient settings

Nullology – Empty Sets in Database Theory and Practice by C.J. Date

Nullology – Empty Sets in Database Theory and Practice by C.J. Date

bkt_nullology

Summary: that’s one of these love-hate relationsips :)

Whether you love it or hate it depends heavily on:

– whether you are concious enough to follow the material (don’t watch it at night while preparing for sleep – definitelly not a good idea)
– whether you are able to admit that SQL queries won’t give a definite answer for all the questions
– whether you are interested in the theory behind the SQL
– whether you like to force your brain to do some real work

For me, there were few surprises in the video. Especially when topics related to empty set were discussed. I mean, it’s coverage in SQL, or better said – the lack of it.

In case you are autodidact in the field of SQL, this video will for sure open your eyes. But it will not teach you the SQL, it will show you what SQL is, comparing to relational theory.

And now, for something completelly different, my perfect quotes from the video are:

“And I can think about practical examples where that could be usefull too. They’re little bit complicated so I won’t try to talk through them now and I leave it as an excersice to you.”

and second one

“Please, remember TABLE_DEE and TABLE_DUM!”

Just get it, if you want to know the limits of SQL, simply get it.

Product page:

O’Reilly (video): Nullology – Empty Sets in Database Theory and Practice

Motif – it’s still usable :)

Recently I was looking for a very fast and very simple window manager that can be used over VNC (with depth 8) so I can save as much as possible in bandwidth and remote computations. I have decided to go with mwm. Yes, with good old Motif. As soon as I did it, I had to make few changes. I wanted to change default applications that are started when vncserver is initiated, I wanted some changes inside Root Menu, and some modifications of default key bindings. After long, long search in google galaxy I have found Motif’s Holly Grail :) 20 years old book from O’Reilly. Just take a look below at the “precious”. Fortunately you can browse the whole content of it from O’Reilly’s page.

mwm

Note! I was too quick. When I started to browse for particular topics, it turned out that parts of the book are not available online :(

An Introduction to Set Theory by C.J. Date

bkt_introduction_to_set_theory

Summary: basics that escalates heavily at the end

If you haven’t heard about set theory and set algebra, you may consider this one as a good introduction. If you have graduated from mathematics or computer science, you already know it. This video targets people who are familiar with relational database but had no chance to get familiar with it’s background – relational model and set theory. From my perspective, this video is overpriced. I don’t judge here the quality of the video, but the content. You should be able to find all the information available in the video by simply googling for the set algebra.

Should you watch this one? Well, it depends. If you have no solid background in the set theory, I would suggest to get familiar with this branch of mathematics. Especially, if you are interested in relational model. If you simply query SQL database for some basic data and you don’t have to create well designed database model – don’t bother. If you think about watching some other C.J. Date’s videos related to relational model, this one can be a good start.

Product page:

O’Reilly (video): An Introduction to Set Theory

Mastering Vim – Understanding Vim’s Lesser-Known Features for More Effective Editing by Damian Conway

bkt_mastering_vim

Summary: Takes every average vim user few steps forward

There is huge chance that you are reading this review because you are looking for some advanced features in vim. And, most probably, you are a regular vim user that already knows few things about it. Typical movements, jumping between words, selecting and yanking simple text regions. This is enough to get work done, but if you are looking for a shortcut to accelerate in vim, this video is for you. Well structured, very concise and extremely well delivered.

I am sure that you will be amazed with unlimited undo section and the ability of vim to persist undos and jump over editing timeline with huge flexibility. I bet you will benefit, right after watching, from advanced searches and replacements. I can guarantee that you will have huge temptation to get Damian’s .vimrc straight away into yours as soon as you finish the whole series.

Huge plus for all additional materials that come with the video course: vimrc, examples, summary of vim’s expressions, and all the commands used over the course. This way you can save lots of time. Instead of digging through the video once again, you can simply take a look at the list of all samples used in the video.

Just one advice from my side – keep your vim close to you while watching video and you will be able to experiment as soon as you watch particular section.

I’d definitely suggest this one to people who know vim’s basics and want to get something more out of it.

Product page:

O’Reilly (video): Mastering Vim – Understanding Vim’s Lesser-Known Features for More Effective Editing

Best quote:

“And so, what you can do with that, is you can say – Well, this whole buffer was not so horrible messed up five minutes ago”

and

“so very nearly right but not entirely”

Things – story of abandoning application over one night

Long long time ago in galaxy far away I have bought Things – for both, my Mac and iOS devices. And I was very pleased using it (in fact, you can find it serving as a background at one of the pictures in the gallery at my blog). Anyway, I was using it constantly all the way during projects.

things_app

The key point here is to give you small background on my task management. I am one of these guys who still uses hand writing a lot, I am huge fan of Moleskine and pens (especially Parkers and Pelikans). However, Things were one of these applications that have made me go digital. So, there I was working with Things all the time. I loved local synchronization between my Mac and iPod, everything was perfect until clouds came. This was something, I simply couldn’t accept. Over one night, I have completely removed all my notes, projects, todos, ideas from the digital era, and went back to paper one.

moleskine

The key factor to do so was “cloud”. Don’t get me wrong. I think that clouds are cool, but I simply don’t trust them. I don’t like the idea of keeping my sensitive date “somewhere”.

I do believe in corporate clouds, where company creates cloud and manage it. I even believe in clouds that are bought buy companies and managed by somebody. But I don’t trust “personal clouds”, where you simply agree to all the licenses saying “you can trust us, you can believe us, but in case anything goes wrong we are out of the scope of legal case”.

So, basically, I don’t store _any_ sensitive data outside my personal storage. Well, maybe with exception to gmail, but I think this is going to change soon as well. You will be able to read that in some other post of mine.

Indentation in Java – how to deal with it in SVN

Indentation may be a nightmare when you want to merge codes between two different branches.

If there are no formatting standards inside your team, if everybody uses different tool, let it be NetBeans, Eclipse, vi, emacs, you will probably, sooner or later, face the same issue – completely unsynchronized codes.

There was this discussion that involved this topic some time ago. I remember I have read it somewhere here: http://discuss.fogcreek.com/joelonsoftware/default.asp?cmd=show&ixPost=3978. Anyway, sooner or later you will face the hell of merge if everybody uses different indentation, different editor and different tab/space schema.

So far, the best solution I have follows.

Check out the code, reformat it as you like, don’t discuss with people what is better, don’t try to enforce formatting rules, don’t fight over this one – there is no point here. Your IDE probably has some magic key to perform “Format code” trick. Just use it and code with indention as you like it.

However, just before committing changes, reformat code again. And here, you have to make some agreement within the team. But don’t fight here as well, as this “storage format” will be used only inside SVN repository. The formatting tool can be anything you like – for example the Eclipse. Simply format code using command line and that’s it.

eclipse -nosplash \
  -application org.eclipse.jdt.core.JavaCodeFormatter \
  -verbose \
  -config ~/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs \
  MyClass.java

Of course, you can put configuration files wherever you like (even in SVN).

This way, you can make sure that files you commit will be really consistent with the code you have checked out. Merging will be lot more easier since now.

The Closed World Assumption by C.J. Date

bkt_closed_world_assumption

Summary: For relational theory addicts

I always have problem while reviewing C.J. Date’s material. The point here is that the quality, content and way of delivering it are always top noch. No questions here. But on the other hand, when it comes to audience, I think they are targeting specific people and really limited number of specialists. In today’s lazy world, we seek for quick and easy answers and when it comes to deeper understanding of certain topics we tend to avoid getting into details – especially when it takes time.

This is exactly the case here. This material is really important for people who want to get familiar with the foundations of relational databases. In practice, we typically focus only on SQL and database engines, but I think that it’s good to get into basis of relational system if we want to really feel what database are all about. It certainly is the case that you will not become SQL expert after this series, but you will be well aware of some of the limitations in the database world.

There are few things that I miss here in the video. First of all, I would like to be able to download the slides as it definitely would improve the watching experience. Unfortunately, I couldn’t find them on the web page. Another issue here is that video material contains topics you can find in some other videos which should be watched in advance to fully benefit from this one (at least that’s what I assume basing on the content).

Big plus here for packing all the content in reasonable time span. It should be quite easy to find an hour, maybe two (if you want to go carefully over all topics) to watch it.

The content of the video is based on Logic and Databases: The Roots of Relational Theory by C. J. Date but you will also find the definition of closed world as well as samples in the book SQL and Relational Theory: How to Write Accurate SQL Code

Product page:

O’Reilly: The Closed World Assumption

Locko – “personal cloud”

I am strongly against clouds, and the reason here is not that some naked pictures recently leaked from somewhere. I simply don’t store sensitive data at someone’s hard drives. Period.

However, I need some sort of cloud for my personal usage – especially for Locko. I don’t want to copy paste all the passwords manually.

locko

As a personal “cloud server” I use svn installed on FreeBSD. To be able to exchange data between Locko’s database you have to transfer this directory

~/Library/Group Containers/J3CP9BBBN6.com.binarynights/Locko.lckdb

All you have to do is:

1. create SVN repository at your server

svnadmin create /svn/repos/Locko.lckdb

2. make sure you can access it in read/write mode

# pay attention to these files
/svn/repos/Locko.lckdb/conf/svnserve.conf
/svn/repos/Locko.lckdb/conf/userfile

3. checkout Locko.lckdb project at the machine that contains Locko database

# MAKE sure to create backup before proceeding any further !!
cd ~/Library/Group\ Containers/J3CP9BBBN6.com.binarynights/
mv Locko.lckdb Locko.lckdb~
svn co svn://yourhost/Locko.lckdb
# go to newly created directory
cd Locko.lckdb
# and get database from original location
cp -r ../Locko.lckdb~/* .
# make sure to add all data into SVN
svn add hosts
svn add default
svn commit -m "created new database for Locko"

4. on second machine, simply checkout database

# MAKE sure to create backup before proceeding any further !!
cd ~/Library/Group\ Containers/J3CP9BBBN6.com.binarynights/
mv Locko.lckdb Locko.lckdb~
svn co svn://yourhost/Locko.lckdb

And that’s it. In my case it works fine as one of the machines is the master and the other one is used occasionally. I haven’t tried to merge simultaneous additions or modifications of passwords. However, I expect some issues here as everything here are binary data.

←Older