Blog::Meta:();

Blog::About();

Blingo
My status

Blog::Resume();

David Branco's VisualCV
“Humanity is the virtue of a woman, generosity of a man.”

FizzBuzz Test In PHP

May 17th, 2008 at 9:43 am by David Branco; 2 months, 1 week ago

For all of you who don’t know - most won’t - FizzBuzz is a programming test by a company to judge whether or not the job applicant can indead program. However, their is a catch, the applicant must develop this test in front of the interviewer on paper in a matter of just a few minutes. If found the test on Coding Horror and thought it was quite the great idea. Upon reading the comments someone attempted to write the code in PHP but it wasn’t quite what the scenario called for.

So without further ado, I present to you (rhymes!), my FizzBuzz coding in PHP in 1 min and 37 secounds:

<?php

for($i=1;$i<100;++$i)
{
	if($i % 3 == 0)
		echo 'Fizz';
	if($i % 5 == 0)
		echo 'Buzz';
	if($i % 3 != 0 && $i % 5 != 0)
		echo $i;
	echo "\r\n<br />";
}

There are quite a few ways to program this but I felt like doing it this way. I really don’t know what this means, but I just was bored. ;)

Life Update

May 16th, 2008 at 11:13 am by David Branco; 2 months, 1 week ago

First off, if I type something incorrectly and don’t notice it, it’s because i’m listening to Buckcherry and wearing a wrist brase because my curpel tunnel is really acting up today. Well, tomorrow’s prom and I’ll be out for a long time; planning on coming back around 6am. Whats really getting to me though is that it’s been a week or so sense I posted those essays and havn’t heard a word about them from ANYONE! Oh well, I have some news about something important but I’m wanting to take pics before I post about it so stay posted. Oh and I’m working on a neat little un-ethical project to try to make some money.

Who’s Reading it Anyway?

May 6th, 2008 at 7:26 pm by David Branco; 2 months, 2 weeks ago

For nearly two decades, professional literature plagued my life in an exponential manner. Waking up, I’d face another day of perpetual torment struggling to understand these “marvels” of classic literature, Hatchet , The Scarlet Letter , and whatever else the teacher found in her smoking, black-leather book all English teachers seem to continuously study.

Growing into my (relatively) old age, I’ve realized books are boring and lack any interest while magically sucking the enthusiasm out of me on contact. That’s my opinion on the larger scale of books, and I catch heat from many teachers for that, but regarding the other small percentage, I seem to become consumed into the pages of the cover floating in the cold, deep-blue sea – bullets whizzing by my head like rain.

Let’s be honest here, I have a small attention span for non-technological things. If a book lacks action and suspense or goes into too much detail, my mind, in an act of self-preservation, switches gears and begins thinking about the first noise or object in sight. If a reasonable and nice teacher did exist, perhaps the wonderful result of some bio-engineered science experiment, they’d present me with books that’d captivate me with action, while holding a knife to my throat for just a tad of suspense.

Never being introduced to my definition of “good” writing, my literature wouldn’t even be worthy to hold your squeaky, unstable kitchen table stable. My writing always seemed to remind me of that cliché phrase “The quick brown fox jumps over the lazy dog,” not in the way you’d expect either, that single cliché phrase was better than my entire piece of writing.

It wasn’t until I had a small series, well two, teachers who introduced me and supported my lacking endeavors to find my literary voice that my writings started gaining lives of their own. Mrs. Fennessy, that gray-headed witch she was, must have thought I was Hansel at her gingerbread house thinking she could just “eat me up.” I had her just one year; she retired; nonetheless, that was the hottest year of that school. She kept me in that boiling kettle until she thought I was “ready.” The second teacher, a typical busy-bodied superwoman, Mrs. Mather, during my senor high school year, understood my lack of literary personality and a major need for a variety of viewpoints. Throughout that last year of middle school, my writing improved radically becoming a style of which this piece endorses.

I will definitely profit off my personal literary development during my times of redundant, mentally stressful actions to make money for the American government, also known as an occupation to the larger population. Software engineers are not battling the English language as much as the unfortunate journalists; however, we software engineers are largely required to document our source code and the burning, evil, bureaucratic paperwork. Granted, employers do not encourage a substantial amount of personality in any type of writing, such as people hired for administration positions; nonetheless, individuality harmonizes a warm, fuzzy feeling for the uninterested readers.

America’s Greatest Strength and Weakness

May 6th, 2008 at 7:24 pm by David Branco; 2 months, 2 weeks ago

It has been publicly acknowledged we, the American citizens, will be known to our successors as “The Age of Information.” With the mass-public acceptance of computers and their other technological counter-parts, we as a generation have embedded these innovations into our everyday lives. While our reasons vary, from medical practice, productivity, or maybe just to ease our workload, we base our everyday life around technology, pieces of powered metal and wire. While the trend seems to indicate that the more successful we become, the more we integrate technology to improve our lives – the more vulnerable we become.

Everyday new technological advances, aimed at easing the lives of millions, are developed. Recent publicly-accepted evolutions such as Paypal and Online-Banking make financial planning and management quick and easy. Computers offer additional services such as entertainment, shown best with recent phenomenon, YouTube, allowing community members to share videos with friends and family. It is inventions similar to these that conveniently enhance our personal standard of living.

Personal profit is not the only benefit to come via this technological era. Businesses such as FedEx and UPS are offering paid on-online shipment tracking. While other companies are finding that they don’t even need to own property to develop a business, all they need is a website and consumers. E-bay, Amazon, and similar sites have made a business out of just selling services or products via the web; some even offer to supply the consumer with the cheapest place to purchase from. This ability currently is taken for granted; lower expenses provide us more comfort in our lives and helps raise the focal point of businesses.

Online services and companies are not the only ones using technology to their advantage; think about your kitchen. Your stove, microwave, and coffee-brewer are all there because of technology. Cell-phones, automobiles, even lights use energy and depend on technology. Without this technology, the nation will confront a major relapse in productivity and the standard of living will decrease exponentially.

Being so dependent on technology, the nation will severely suffer from any major technological catastrophe. If the nation ever had a major power-failure, how would we recover? We would be unable to call our families and loved-ones; the ability to purchase any item at any store would be gone. The best solution we would have is to wait, and hope our power would recover so we may continue with life. Currently most major retail chains and a percentage of home-owners own a backup power generator to combat a short power-outage. These methouds are quite suitable for black-outs ranging from secounds to a few days; however, these alternative power sources become expensive for extended periods of time.

Power is not the only woe on the “back-burner” for many computer users; one single virus, engineered correctly, has the power to cripple the entire technology era. A virus, according to Merriam-Webster, is defined as “a computer program that is usually hidden within another seemingly innocuous program and that produces copies of itself and inserts them into other programs and usually performs a malicious action (as destroying data).” If such a virus was engineered with care, infiltrating any networked and numerous off-line machines will be possible; even the ability to stealthfully manipulate government data.

As technology advances, security auditors play a game of “catch-up,” releasing security patches and strong security systems along with their accompanying protocols. Technology will never be truly safe; the best precaution any consumer can take is learning how to properly setup firewalls and routers to protect and monitor their networks’ traffic. The more secure the nation becomes in technology, the easier we can live our lives, as the threat to the modern inventions contracts.

Day of Termination

May 6th, 2008 at 7:23 pm by David Branco; 2 months, 2 weeks ago

The particle system’s fire FX must be denser I thought to myself, entirely consumed by my programming. It was a dreary and rainy evening just before dinner, roughly 7:30 pm. I was in my large, green-carpeted bedroom in my log-cabin. All seemed peaceful, just another day in life, until “it” happened. At first I heard a loud thud and some items being dropped. These sounds didn’t even phase me compared to what I heard next - my mother screaming.

Without hesitation, I jumped up from my black office chair and ran down the wooden stairs to the first floor of the house. It was then I realized I was holding my breath, letting my imagination run wild. I had to take a few seconds to breathe, leaning on the cedar wall that held up the pictures of my two half-brothers and me, before continuing. Regaining my breath, I opened the door to the makeshift, non-railed stairs that protruded from the basement. I had seen, at the bottom of the stairs to the right, fragments of what had happened moments before. Upon examination of the dark-shaded cement floor, I spotted the shattered remains of what was once a tall forest-green coffee-mug and this kind-of dark red substance - blood. With my curiosity and worry magnifying, I bolted down the stairs, falling into the wall in front of me. Regaining balance, I looked around the basement for someone - something - that would tell if the person whose blood was on the floor was still relatively well.

First, I saw my mother, then the phone in her hand. “… He… stairs… arm…” These were the only words she said that I could make out through this hysteria. This was followed by my father screaming in pain on the other side of the basement. Realizing I wouldn’t get much information out of her, I went searching for my father.

Unable to see him due to the stairs and the wall in my way, I slowly walked toward his voice. Creeping along the cold cement floor to the dark red carpet lining my way toward the direction of his voice, I saw him. My father was reaching into a tin can that he had used for storage. He appeared to be searching for something; for what , was another question entering my thoughts. “He is trying to hurt himself,” my mother struggled to tell whoever she was speaking with though her tears and her crying. She must have heard my father’s scream of pain. “I’m looking for my wallet!” my father exclaimed, his intentions to raise his voice that loud must have been so whoever was talking to my mother could hear.

“Dave, I’m going upstairs…” My father had noticed me and started talking, speaking in an unusually-low voice, trying to remain calm. “I need you to follow me, and watch me until the cops come here. I need you to tell the cops that you have been watching me since the accident.” The cops? What is happening here? Without even time to think I noticed myself nodding, following my father slowly up the stairs, to the right, into our living room. There was absolutely no sunlight and my father had forgotten to turn on the light, thus I was not able to make out his physical condition. It was at this time that I closed my eyes for a brief second and tried to make sense of the few fragments I had of what had just taken place.

My mother had fallen; she said something about her arm. The blood! Was it her blood? The mug, it was shattered… Did it cut her? Why did my father need his wallet? What had happened? Why were the cops coming? I couldn’t work up the nerve to ask him anything, he had this look on his face; this was the first time I had seen this look. I could not tell if this was the look of fear, or the look of nervousness, but I could tell it would be best to hold off from questions. There I sat, wondering and watching my father, letting curiosity getting the best of me as I waited for the next series of events.

From red to blue, the room began to oscillate; the police were here. Gradually, I rose from my position on our faded-blue chair, walking to the front-door to let the authorities enter. “Where is the wife?” one officer asked me. “In the basement, the stairs are right over there.” I pointed, taking notice of the paramedics that had also entered the house. “Now where is the husband?” the same officer questioned. “He is in here, follow me. I have been with him ever since I heard the crash.” I stated, still not knowing what the crash was or why they were even here.

“Son,” the police officer started speaking, “I want you to go check on your brothers; make sure they’re still sleeping.” Doing as I was told, I walked back up the stairs and entered my brothers’ dark bedroom. Without turning on the lights, I slowly crept around, as to not make a sound, making sure they are both still sleeping. As slowly as I came in, I left and headed downstairs. Turning right, I noticed my mother crying in the middle of the kitchen on a wooden stool. Paramedics were providing their services to her right arm; I couldn’t see the extent of the damages.

As soon as the paramedics had finished with my mother, they tended to my father. I approached my mother, this was my time. If I were to find out what exactly had happened, I had to ask her. “Mom, are you okay? What happened? Why are the police here?”

“I’m okay; they had to stitch my arm. I fell off the stairs, I landed onto glass, and it cut my arm. Your dad…” She started to say something, but was cut off by the police. Great timing, I was just about to figure this all out!

“Son, can you please go and talk to your father. We need to talk to your mother and get her take of this event,” the police officer said. If you call me “Son” one more time… and I was not finished talking here. She is my mother, by what right do you have to stop me! I thought, but I failed to reply with my instincts and did what I was told; there was too much trouble in the air as it was. I walked back across the hallway and into the room where my dad was settled; this time the light was on.

“Dad, what happened? Are you okay?” I asked him.

He responded, in a worried voice, “I’m okay, I think I sprained my arm but other than that I’m fine. How is your mother, is she okay?”

“I don’t know. I saw the paramedic leave her. She had stitches, she should be okay though.” I replied trying to sound confident to reassure him.

“She was coming down the stairs with a box in one hand, her coffee in another. I was coming up the stairs and when she saw me, she lost her footing. She tried to balance herself by grasping onto me, but that only brought me down with her. She fell without letting go of the cup. I…” My father paused, trying calming down as to hold back the tears.

“She fell onto the cup and it cut her. I fell onto my arm. She jumped up and called the police.” With every word he spoke, I was frantically trying to guess what he was going to say next, never once guessing what actually happened. If this was an accident, why are the police here? Something doesn’t add up.

The police walked in shortly after my father was done illuminating me on the events that had happened prior, to speak to my father, “Sir, we’re going to need you to come down to the station for a little while. If you could please gather any items you may require and follow me.” My father, without speaking, slowly went to his bedroom, grabbed his medicine, and followed the police out the door.

This seemingly innocuous incident was the final straw for both my parents. Maybe it was indeed an innocent accident; however, the result was catastrophic. This was the day my parents made it clear to each other and the family, they wanted a divorce. Several court-dates later, my mother moved to Tennessee, while I’m left here with my father and brothers in Rhode Island, making the best with the cards we’ve been dealt.