Sunday, June 8, 2014

Reopening the blog after a year...

Hi all,

Welcome back to Musings of a Blind Highlander. It’s been a year since I posted about my life and other topics. Now that I’m learning about few advanced things, I’d like to take some time to share it with you.

So what was I doing for the past few months? I’ve been continuing with my computer science degree, wrote some NVDA code and what not. I hope to continue with NVDA add-ons series and continue with CS topics.

 

 

Monday, May 20, 2013

NVDA add-ons 1: what you'll need

Hi,
Let's start the tour of NVDA add-ons by looking at tools we need.
Along the way, I'll give some advice on things you may need to know
before continuing with this journey.
First, you'll need the latest version of Python interpreter for
Windows (32-bit or 64-bit). However, please use 2.x for now (2.7.3 is
recommended). Next, you'll need Gettext package for Windows (there are
two files you'll need). Next, grab SCons 2.3.0. And, of course, latest
version of NVDA (either portable or install versionl source code would
be fine also). Finally, grab the NVDA add-on template at:
http://bitbucket.org/nvdaaddonteam/addontemplate
Once you've got everything installed (including configuring the
environment variables so SCons can be run from command prompt), we're
ready to begin our coding adventure. But first, a few things you might
want to know before starting the actual coding:
* Get to know Python and basic concepts behind object-oriented
programming, such as classes and inheritence.
* Get to know the layout of NVDA's codebase so you would know which
modules to use and which functions to call.
* Examine how other add-ons were built so you can get an idea of what to do.
* Read NVDA user guide and developer guide to familiarize yourself
with NVDA's design, usage and code.
Up next: types of add-ons and some examples.
//JL

Sunday, May 12, 2013

New series: All about NVDA add-ons

Hi,
Let's take a break from C++ for a while (we'll resume with data
structures and continue on with pointers, recursion and what not).

As a new direction, I'd like to start a new series on NvDA add-ons,
specifically add-on development and a few working examples. Note that
I'm still learning the add-on interface and am also learning Python,
so there might be incorrect information.

For starters, NVDA stands for NonVisual Desktop Access. It is a free,
open-source screen reader for Microsoft Windows (similar products
exists for Linux). It supports latest Windows versions in both 32-bit
and 64-bit architectures (no ARM yet) and supports many applications
out of the box.

One of the attractions of NVDA is its extensive plugin architecture.
The core NVDA code can be extended by add-ons to provide global or
app-specific functionality, such as providing new commands, improving
access to applications and so forth. Besides this, add-ons may bundle
new speech synthesizers or add support for braille displays.

This new series is not meant to be a complete tutorial on Python
(there are many websites which talks about Python), nor a complete
tutorial on C++ (although parts of NVDA is written in CPP). The new
series is aimed towards mostly new add-on writers and to serve as a
reference guide for existing add-on authors as well (I'm a beginner
myself). Occasionally, I may provide example code that does work
(along with some C++ equivalents to Py code). But most importantly, I
welcome corrections.

So let's get started with the new NVDA add-ons series by talking about
what you'll need for add-on development.

Saturday, May 11, 2013

Email test...

Hi,
It's been a while since I posted via email...

Huge updates...

Hi, It's been almost two years since I came online... What did we talk about last time? Well, we did discuss C++, mission work and others. This year, I'm going back to summer missions, this time to Sri Lanka. In addition, I'm learning Python and am contributing to NVDA (nonvisual Desktop Access) and studying CS as usual. Hoping to keep in touch with you, the readers as I continue with C++, few notes on Python and an extensive series on NVDA add-on development. //JL

Tuesday, July 26, 2011

C++: Stack and heap

Hi,

Well, it's beren over a year since posting this to the blog...


Last time, we looked at dynamic memory and consequences of memory leak. This
time, we'll go over a short note on stack versus heap memory.

Stack, as you'll learn about it a bit more later, works like a stack of
dishes. Whatever you store on top will be the first one to pop off. In
programming, this memory location is used to hold variables declared at
compile time - that is, variables that programmers put on source code, which
has a name and content. For instance, a declaration like:
int i = 5;
Would be stored on the stack, since it'll be converted to whatever the
program would use when the compiler is run.

Usually, a stack grows from bottom to top i.e. 1, 2, 3, etc.

As opposed to stack, a heap stores variables stored dynamically. For
example, the car dealership we saw last time would have the car info stored
on a heap. Whenever you use the keyword "new" and "delete", whatever that
was declared would be stored on a heap (new) and removed (delete) from heap.
By the way, the amount of heap used will depend on how many dynamic items
(or objects) you'll be using; and be careful: when you forget to delete
dynamic memory, the operating system (system software) would not take the
memory back and the program will create memory leaks!

Usually, a heap's memory address grows from top to bottom i.e. 5, 4, 3, etc.
For most cases, the stack and heap addresses (memory locations) would not
touch each other.

Quick review: Where would the following two variables be stored:
A. string name = new string[2];
Since the keyword "new" was used, it'll be stored on heap.

B. string my_name = {"Joseph", "Riverside"};
Since the variable was declared without usage of dynamic memory keywords,
it'll be stored on stack.

There is actually a third memory type, but I will not touch it yet - that's
reserved for later.
//JL

Tuesday, July 19, 2011

Few updates...

Hi,
Well, it's been a number of months since I've posted to the blog. I was busy
with schoolwork, mission work and so forth - preparing for upper division as
well. Currently, I still have plans to finish C++ notes and move onto data
structures, as well as start talking about hardware.
//'JL