Friday, September 9, 2016

Peeking through the Weeds

I have obviously been neglecting my blog for sometime now. I can only say that I have been busy and mostly lazy. My plan is to start devoting more time to this blog venture and see if I can do it some justice.

I am not a writer by any means. I hate the study of grammar.  Give me math and science any day of the week and I will be happy. This blog is a way for me to get better at grammar, writing, and get stuff out of my head that I want to share with others.

Should be a fun ride so check back often as I hope to keep things running the best that I can.

Friday, July 24, 2015

Web Safe Code Cleaner In Python

This is a simple Python 3 script that I wrote to strip out the symbols that cause the web browsers to go crazy when you are trying to display your code.


 from tkinter import *
 from tkinter import ttk


 # Create the event handler first
 def btnConvert_Click():
    temp = tbSource.get('1.0', 'end')
    temp = temp.replace('<','<')
    temp = temp.replace('>','>')
    tbOutput.insert('1.0',temp)

 def btnClear_Click():
  tbSource.delete('1.0','end')
  tbOutput.delete('1.0','end')


 # Create the top level window/frame
 top = Tk()
 top.title("Web Safe Code Converter 1.0.0")

 fra = ttk.Frame(top)
 fra.pack(expand="true")

 # Now the frame with the two text widgets
 fraEntry = ttk.Frame(fra, border=1)
 tbSource = Text(fraEntry, width=40, height=20)
 tbOutput = Text(fraEntry, width=40, height=20)
 fraEntry.pack(side="top", expand="true")
 tbSource.pack(side="left", expand="true")
 tbOutput.pack(side="right", expand="true")

 # Finally the frame with the buttons.
 fraButton = Frame(fra)
 btnConvert = ttk.Button(fraButton, text="Convert", command=btnConvert_Click)
 btnClear = ttk.Button(fraButton, text="Clear", command=btnClear_Click)
 btnConvert.pack(side="left", padx=5, pady=6)
 btnClear.pack(side="left", padx=5, pady=6)
 fraButton.pack(side="top", expand="true")

 # Run the event loop
 fra.mainloop()

Friday, June 12, 2015

Java - A Web Site Launcher Class

Here is a simple Java class that I wrote that will launch a default web browser:


// A simple and easy-to-use class that will launch a default browser.
// Noble D. Bell, June 5, 2015

public class LaunchWebBrowser {
 
 public String webUrl = ""; 
 
 // Initialize Object with data. If none is supplied then default to my web site.
 public LaunchWebBrowser(String url) {
  
  if (url.isEmpty())
   webUrl = "http://www.noblesoftware.com";
  else
   webUrl = url;
 }
 
 // Display the web site in the system's default web browser.
 public void GotoWebsite() {

  try {
   java.awt.Desktop.getDesktop().browse(java.net.URI. create(webUrl));
  } catch(java.io.IOException e) {
   javax.swing.JOptionPane.showMessageDialog(null, e.getStackTrace().toString());
  }
 }
}

Tuesday, February 17, 2015

HP Windows 8.1 Laptop BIOS Setup

I just found out something interesting about my somewhat new HP Windows 8.1 laptop. If I want to get into the BIOS I have to follow a little procedure that does not have to be done on laptops that are not running Windows 8 evidently.

To get into the BIOS I have to do the following:

1. Hold down the <left shift> key will selecting shut down on the computer. (This is to temporarily disable the hybrid boot.)

2. When you push the power button on the laptop start hitting the <esc> key until you get a boot menu.

3. Press <F10> from the menu to get into the BIOS.

Sounds like a lot of work just to get to a BIOS but I will take it.

Saturday, February 7, 2015

The Mind Games of Choosing Developer Tools

There are so many different languages, platforms, frameworks, and IDE's to choose from out there in the wild that picking the one or ones that you would like to use could drive you absolutely crazy. Everyone has their favorites and they try and entice new users into their camp and way of thinking.

I want to tell you first hand, if you start allowing all this noise to get into your brain you will not be able to think clearly and you most certainly will not be able to find solutions to your problems and be able to develop any useful code.

The best way you can battle this kind of onslaught for your attention and money is to look at the offerings, try them out for yourself, and do not, I repeat, do not look at other developer's posts, or reviews. You have to pick for yourself. Your choices should be based on what makes you happy and what makes your more productive.

In closing, keep in mind, that the user of your software does not really care that much, if at all, about how you developed it or what wiz-bang language or technology you used. They just want to see their requested results.

With all of that being said remember that you are a developer for a reason. You like to solve problems and write code. Lots of it. If you are always sorting through the what and the why of using some tool or technology then you are not doing what you love.

It is tough out there, use what you like.

Until next time, God bless and have a great day.