Idea for a queue-based File Transfer Utility

I got an idea. I could go on about what inspired idea but I think I’ll just bore myself. I’ll just say that it’s out of need, and it’s just sad someone’s not already done it. Here’s the sketch of what’s on my mind:

  • It’s a GUI wrapper over some simple commandline tool (basic DOS commands to start with, might look into Robocopy later).
  • The goal is NOT to achieve a speedy file transfer (like Teracopy for example). The main point is proper queuing support.
  • Design should be simple enough for someone to pick it up and start using it immediately. It’s a file transfer utility, not the dashboard on a space shuttle.
  • I want this to be cross-platform someday (at least Windows and Linux), the GUI will simply make use of commandline tools. I’ll start with Windows and once it meets some basic requirements, if I have time and more importantly if I feel like it, I’ll work on a cross-platform version.
  • Tool of the trade: wxPython.

The features I want to implement first:

  • Cutting/Copying files adds them to a queue (I’m thinking take over Ctrl+X and Ctrl+C). It’ll basically be like “Enqueue in Winamp”.
  • Before pasting the queue, you can view and edit the queue. Then Ctrl+V or paste will move/copy those file in the order of the queue one after another. Note: I need to investigate parallel file transfers, but for starters, I’ll stick to one file at a time, based on my experience that multiple transfers take more time than the individual transfers combined.
  • As soon as a file is copied or cut, the queue window appears in an always-on-top (non-optional) and transparent (optional) window.

I’m not the type to plan everything out in the beginning, I like to get out a prototype and chalk out the plan as I go along, even if it means a lot of rework along the way. It’s just how I’m comfortable doing things. So basically, when I’m in the right mood, I’ll draw some mockups and whatnot and start from there but in the meanwhile, I gotta get comfy with wxPython, at least the basics. More updates as they come, no particular ETA.



Under-used Keyboard Shortcuts for Text Editing

Most people know about the basic windows shortcuts for Cut, Copy and Paste (right? Smile with tongue out), but there are a few more shortcuts that I consider are invaluable when writing text. And I was surprised that most people don’t really use them. I am talking about the Home and End keys and their respective combinations with Ctrl and/or Shift keys.

  • Home: Takes the cursor to the beginning of the current line.
  • End: Takes the cursor to the end of the current line (after the last character in the line).
  • Ctrl + Home: Takes the cursor to the very beginning of the active text field/document.
  • Ctrl + End: Takes the cursor to the very end of the active text field/document.
  • Shift + Home/End/Right/Left/Up/Down: Selects all the text between the initial cursor position and the final cursor position.
  • Ctrl + A: Selects everything in the active text field.

All coders and pretty much everyone who types a lot of text in your everyday life, for the love of God, drill these shortcuts into your minds! I promise your productivity will increase at least by 30%.  Here are a few examples of usages:

  1. Example 1 (Ctrl + A): Say you want to post a rather long status update in Facebook and twitter. Type out your message, hit Ctrl + A, then Ctrl + C. Then hit the post button in Facebook, go to Twitter, click on the “What’s New” text box, press Ctrl + V and post it.
  2. Example 2 (Shift + Home): Say you’ve written a complex printf() statement in C to display some information and you have to repeat the same output with a few changes about 5 times. Here’s what you do: Type out the first printf() statement. Your cursor will be at the end of the line right. Now press Shift + Home. The cursor will move to the beginning of the line because of the Home key, but it will also select all the text along the way because of the Shift key. Now copy and paste it as many times as you want. You have thus successfully avoided moving your hand to the mouse, moving the cursor and selecting the text by mouse movement. You’ve achieved all that in just 2 keystrokes: Shift + Home, without taking your hand off the keyboard. Note that you can use Shift with the arrow keys to select text letter by letter.

Aside from these shortcuts, I implore you to familiarize yourself with the keyboard shortcuts of the programs you use the most. It will drastically reduce the time needed to perform simple but repetitive actions. Just use Google, because as they say, Google is your friend! And if you don’t listen, then this Smile with tongue out


The odd details of C++

I’m revisiting C++ with the intention of figuring out the details. This post will contain various little things and questions and pretty much anything. I intend this list to be “something that you won’t typically find in most books”, a list of the details of the C++ language. Not to mention, this page will be changing constantly as I add new information or get answers to questions listed.


(?) – Still needs confirmation, some info missing.

And the list begins:

  1. Structured vs. Object oriented programming: Structured programming is task-centric where as object oriented programming is object-centric. For example, in structured approach, when a task is to be performed, we first think of subroutines and then the data structures. In OO approach, we first think of the objects needed to perform the task, then we design the details of the objects and their behaviour. C is a structured language, C++ is an object oriented language.
  2. (?) Default values for data types in C++: When variables are declared and not initialized, what are their values? I believe number types will be set to 0, but it might depend on the compiler. For example, C-Free 4 gave garbage values to int, float and char variables. But when run multiple times, the value for int kept changing but the values for float and char remained the same. Confirm.
  3. (?) String Mutability: Need to explore string mutability, even by using pointers. For example, when I have a char pointer, can I still use it when I change the string length?Also need to explore String class capabilities.
  4. Static variables and functions: Figure out 1.Where static variables can be a.declared b.initialized and experiment on their scope.