Reading a book

I read Introduction to HTML and CSS by Danny Ajini. It was approximately 155 pages and was a quick read, despite all of the interruptions I had today. I am trying to supplement and add to my web development knowledge with books and videos. I continue to experiment with CSS and find it a lot of fun, since moving to CSS3. Expanding and updating my development skills and learning Spanish; both make learning the syntax and vocabulary, a great experience that I relish.  

Compiling C# with Notepad++

I setup this borrowed Windows XP netbook with an external hard drive for more space and now have a killer development platform (though it doesn’t have internet access). I downloaded and installed all of the important applications that are on the development lists of Tiobe and other such sites. It has MySql and Sqlite on it. I have installed Ruby, Python, Java, Xampp, Perl, R,  Haskell, Go, Prolog, Fortran, Basic, Assembler, C#, Lua, Smalltalk, and C++. I have Gimp and Irfanview for any image needs and use the number 2 or 3 most popular IDE: Notepad++. I am currently doing all of my HTML, CSS, and JavaScript projects in it. 

I wanted to check and see if I could compile a simple C# test program from the IDE, so I found instructions online. I changed it for this machine and it works! I wanted to keep a copy of the posts here from Stack Overflow below for future reference…

I use a batch script to compile and run C#:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc /out:%1 %2

@echo off

if errorlevel 1 (
   pause
   exit
)

start %1 %1
I call it like this:

C:\bin\csc.bat “C:\code\MyProgram.exe” “C:\code\MyProgram.cs”
I also have a shortcut in Notepad++, which you can define by going to Run > Run…:

C:\bin\csc.bat “$(CURRENT_DIRECTORY)\$(NAME_PART).exe” “$(FULL_CURRENT_PATH)”
I assigned this shortcut to my F5 key for maximum laziness.

———————————————————————————————————–

Little too late, but here’s the one that worked for me: I called this batch script bnr.bat (Build and Run)

echo Building project..
C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /out:”%1\%2.exe” %3
echo Running project
%1\%2.exe
pause
Save this bnr.bat file and and then use NPP’s Run and set The Program to Run as follows and before you press Run button, press Save and provide your custom shortcut keys:

<directory_where_you_saved_bnr.bat>\bnr.bat $(CURRENT_DIRECTORY) $(NAME_PART) $(FULL_CURRENT_PATH)

the $ constants are defined internally in NPP:

$(CURRENT_DIRECTORY) is the full path of the directory containing your C# file.

$(NAME_PART) is the name of your C# file minus extension (.cs).

$(FULL_CURRENT_PATH) is the full path for your C# file.

This does not have any error checking, but pause in batch script will allow you to see the errors and exceptions within the console before you exit the script.

I had set the PATH environment variabile, but somehow this batch script did not find csc.exe, because it was looking at the npp bin directory.

Display Properties and Box Model Mania

Display properties in CSS can override the behavior of inline and block elements in the html file.

Inline elements can take on the behavior of block and or parts of both inline and block elements with the attributes of block or inline-block respectfully.

For example: display:block in a <span> tag can make it act as a block level element by allowing them to take on width and height values.

Using display:inline on a <p> tag will make this element act as an inline element.

If you use display:inline-block on either elements then they will take on attributes of both.

The inline part of the attribute will line up the elements side by side, but block will allow them to take width and height values.

 

The browser sees each individual element as a box with width and height for the content, padding for space inside the element, and margin for space outside the element. This is like a package which has layers around it. The content is the box with the gift (content) inside, the padding surrounds it, and the margin is the outer wrapper for this browser “package”. A border is between the padding and margin and outlines where they intersect.

 

Finished another Lynda.com course- CSS Essentials 1. Next, CSS Essentials 2.

CSS fonts

CSS fonts- 5 generic font options: Serif, Sans serif, Cursive, Fantasy, and Monospace.

Choose similar fonts, use commas to separate each option, and use a generic font family as last option. Always declare generic fonts without quotes. Two or three declared fonts are standard. The website, www.cssfontstack.com is a good resource.

Web fonts are not pre-installed on user’s computer, but may be a downloaded file that is included like other files. Link to these files using the @font-face method.

In your css file you declare it like so,

@font-face {

   font-family: “Font Name”;

   src: url(font-name.ttf);

}

then use it like any other font-family,

body {

   font-family: “Font Name”, Arial, sans-serif;

}

Modern browsers support the WOFF and WOFF2 file formats.

CSS Tricks website has information on @font-face for older browsers. The website, www.fontsquirrel.com generates free fonts to download.

You can use external font sources that are hosted online, such as Adobe Typekit or Google fonts. No need to download files. Google fonts are free.

According to www.css-tricks.com, to use a web font that is hosted on Google’s server declare,

@import url(//fonts.googleapis.com/css?family=Open+Sans);

then use it like before,

body {

   font-family: “Open Sans”, Arial, sans-serif;

}

You can also use a link to the URL and then place that link inside the head before the main css file.

 

Google maps

I recently read at Developers up in arms about price hikes that they are now charging everyone to use their Google maps product. The only way around it is to create a nonprofit and apply for a grant. This will have grave implications on social conscious and personal developers alike.

I wanted to create a mapping application to help social advocacy groups and others and I was going to use  Googlemaps to implement it, but now I’m not so sure. I may go with Openlayers and OpenStreetmap for this project instead or I may do it in Google Maps anyhow for proof of concept. I will keep researching until I find a solution that works.

The beginning

I am creating this blog after listening to several developer podcasts that say to create one concerning my journey to a programming career. A few years ago, I took part in a machine shop program for approximately six months. During that period, I realized that I enjoyed creating items. Whether I  made a trailer hitch with pin on a manual lathe and drill press or using CAD drawings and G-codes in CNC simulations. In the past, I have created promotional videos and class teaching materials, so I enjoy being creative and seeing the results.

In each of these undertakings, I used methods of pre-planning through storyboarding videos or blueprints for machining parts. I did all of these processes on older equipment, such as HAAS manual lathes or a 60 gb pentium computer for video editing and creation. Despite these limitations, I enjoyed the outcomes of these endeavors.

I have taken all, but one math class towards a Bachelor’s degree in Computer Science. Helping students in web design classes or programming Java and Lisp while being a lab assistant at previous colleges I attended. For the first time in years, I will be changing from classroom assignments with languages such as C or Java and moving more towards scripting languages with practical projects. I have experimented with Python in the past, but now I want to work on Javascript. This means that I will have to update my HTML knowledge from 4 to 5 and get into CSS.

On an old Windows XP 11 inch netbook that a friend loaned me, I was able to free up the drive from a measly 130 mb of free space to over 2 gb. I have been able to install XAMMP, notepad plus plus, and several other programs on it. My Internet access is currently restricted to the cell phone I recently purchased. This endeavor, along with my recent study of Spanish should move me in the right direction towards my goal. Let’s get going!