Recent Updates RSS Toggle Comment Threads | Keyboard Shortcuts

  • avatar

    Josue R. 8:56 pm on April 29, 2012 Permalink | Reply  

    Regarding latest Stargate “new format” announcement …. 

    I swear to Asgard, if the Ancient Destiny ship does not return by 2014 I will go all medieval on MGM and that stupid lion.

     
  • avatar

    Josue R. 4:00 pm on January 30, 2012 Permalink | Reply  

    Hitchhikers Guide to Code Development with Git 

    Git’s most powerful feature is Branching. It allows you to work on your code (feature/bug/etc) without affecting the codebase every else is working on. Allows you to merge your experimental branch into the development stream, share individual branches with another developer or completely ignore them.

    Production/Development Branches:

    • “MASTER” – Always deployable working production code. Important: Never develop on this branch.
    • “TEST” – Everyday you’ll be working on this branch, the development codebase. This branch will always have the latest and upcoming release cycle.
    • “…..” – This branch(s) can be whatever name you wish. Its suggested they have names:
      • “Feature-X” – A feature or experimental branch. Its recommended to name them as your task name or number. hence “Feature-210” or “Feature-EnhanceNavMenu”.
      • “Bugfix-X” – A bugfix / code patch for known bug.
      • “…..” – Anything else you wish to name your working branch.

    * These branches should only be temporary. When you’re done with a branch (merged to TEST or ignoring the branch permanently), you can easily delete the branch with:  git branch -D <branch name>


    Daily Development Cycle:

    You’ll be working on improving the codebase (feature or maintenance) or fixing a bug from TEST branch:

    1. git checkout test  # Switch  to the TEST branch to pull the latest codebase.

    2. git pull  # Pull changes for all branches to see whats changed.

        # For individual branch pull do: git pull origin <branch>


    if you’re starting work on a new feature or bug fix, then checkout to a new branch:

      1. git checkout test # Make sure we’re on the TEST branch.
      2. git checkout -b <branch name> # Create a new branch from TEST (latest codebase).
      3. …. continue working on code ….
      4. git add .    # Add all files to index to commit changes.
      5. git commit -a # Commit changes, this will open up the editor. (See below for commit msgs)
      6. git push    # Push your changes to the server/team.


    if you’re already working on a feature/bug branch, then checkout to it to update codebase & continue work:

      1. git checkout <branch name> # Switch to your existing branch.
      2. git rebase test
        # Update / merge your branch with the latest codebase from TEST.
        # Rebase will take all commits from TEST and apply to your branch codebase, then your commits within the branch will be moved to the top of the merged commits. Its called “Fast-Forwarding”.
      1. …. continue working on code ….
      2. git add .    # Add all files to index to commit changes.
      3. git commit -a # Commit changes, this will open up the editor. (See below for commit msgs)
      4. git push    # Push your changes to the server/team.
    1. …. continue working on code ….


    NOTE: Before merging branches or pushing changes to the team or server, it’s important to test your application to make sure all features work correctly and/or meet test cases. * Sometimes we forget to test and users or team members suffer. *

     

    Fixing Bugs:

    Sometimes a bug is found in production code or during the release (dev) cycle. Follow these steps to fix accordingly.

            If found in production and it is a major bug which prevents users from using the application/core features:

    1. git checkout master # Switch to MASTER branch.
    2. git checkout -b <Bugfix-X> # Checkout to new branch from MASTER codebase.
    3. …. fix bug code  ….
    4. git commit -am “Bugfix: <desciption of bug fix / etc….>”
    5. git checkout master # Switch to MASTER branch.
    6. git merge <Bugfix-X> # Merge branch changes into MASTER branch.
    7. git push # Push MASTER branch codebase to server.
    8. git branch -D <Bugfix-X> # Delete the bugfix branch if no longer needed.

      If found in production and it is a minor bug (which is maybe irritating on unnoticeable by the user) then you can perform the above steps to fix or suggested to fix in the TEST branch (release cycle).

      If found in release cycle and it is a major or minor bug, then fix the bug and continue with release cycle. It’ll be pushed to production when all tasks are completed anyways.


    Commits & Messages:

    Commit messages are important and should describe your fixes, improvements, etc. You can write a brief message or detail commit that outlines important notes and possible files to look at so other team members understand how the code changes affect the partial or entire codebase.

    Brief (samples):

    • git commit -m “Feature 123: user is able to add comment to profile.
    • git commit -m “Bugfix 456: resolved issue with dropdown menu flickering.


    Detail (sample):

    • git commit -a # Default editor will open (nano, vim, etc…) … then you type your message:

    Feature 123 – User is able to add comment and assign to friends to profile.

    1 – able to add dynamic comment to profile via ajax.

    ** able to add, edit, delete.
    ** able to attach friend to commit, then notifies friend via email.

    2 – notify user when friends reply to their comment.

    URL: http://dev.app.com/profile/1234
    DB changes: new table user_comments & user_comment_notify (app/schema/user_comments.sql)

    • … save in editor and git commit is done…


    Your application environment should always be ready, working code and deployable. The following example is an effortless and plain setup and release cycle, from development to production changes.

    Server Environment:

    There should be at least three environment setups:

    • LIVE – Production code, the real application directory. Should point to git branch “MASTER”.
      Document Root: /var/www/app_live/
    • TEST – Testing environment, QA server / etc. Should point to git branch “TEST”.
      Document Root: /var/www/app_test/
    • DEV – You localhost machine. Should always develop in “test” or any other git branch except “master”.
      Document Root: /Development/app/


    Release Cycle Phases:

    1. (DEV) Pull & develop code in the “TEST” branch.
    1. (DEV) push your “TEST” branch changes to the server. Either the project manager or members or QA can test from here.
    1. (TEST) SSH into the server (app directory) and pull from the “TEST” branch. Also import any db structure updates.
    1. (TEST) visit the application, http://test.domain.com  and test all features and updates. *record bugs*
    1. (TEST) if everything looks okay and testing went well, then checkout into master branch and then git merge “TEST” branch into “MASTER”, then push changes to “MASTER”.
    1. (LIVE) move to the production (app directory) or SSH into production server and pull the “MASTER” branch changes.
    1. (LIVE) for sanity check, visit the live application, http://www.domain.com and quickly test over features. Congrats, your application is now live and updated to your users.


    Sit back till bugs are reported or continue next release cycle. Grab yourself a beer & go out and play !!

     
    • avatar

      Gregg Williams 1:33 pm on February 13, 2012 Permalink

      Bless you! I’ve been pursuing the same approach to git developement, but I’m not so adept at git, and sometimes things go wrong. This is an excellent blueprint–thanks!

    • avatar

      mitchell amihod 2:22 pm on February 13, 2012 Permalink

      nice article. One change i would recommend – using the -d flag for delete. this will help people from accidentally deleting an unmerged branch.

  • avatar

    Josue R. 7:52 pm on January 21, 2012 Permalink | Reply  

    Dark Matter, a possible Stargate Universe alternative? 

    Stargate writers and producers, Joseph Mallozzi and Paul Mullie, have teamed up for a 4-issue comic series called Dark Matter. Here’s an official series description:

    Dark MatterA derelict ship floats in space, its troubled crew awakened from stasis with no memories of who they are or how they got on board. Their search for answers triggers the vessel’s deadly security system: a relentless android bent on their destruction. Facing threats at every turn, they have to work together to survive a voyage charged with vengeance, redemption, betrayals, and hidden secrets best left unknown.

    It’s said Joseph Mallozzi is pitching Dark Matter as “a high-end cable television series.”

    Based on the official series description, I can only imagine it will be very familiar to the Stargate Universe (SGU) tv drama and character suspense with the touch of space missions.

    I for one would love to see the SGU return but thats very unlikely. I’m quite sure it was in Mallozzi’s interest and the rest of the SGU crew to entertain us with many more amazing episodes and seasons. I also remember SGU was originally pitched as a five season series.

    Hopefully Dark Matter can bring those same character plots and dramatic yet complex human interaction that was instilled in SGU from the beginning, which left us at the very end of it’s series finale with a memorable cliffhanger and endless questions.

    If this is the alternative version of the Stargate Universe tv show set with a different format, space mission and badass enemies, I will personally take whatever these fine writers and masters of Space tv show drama and action scene they have to offer. I know many other Stargate fans would agree.

    You can still watch every Stargate episode, season and every series on Netflix.

    Stay tune here or read the article post from GateWorld for further details on Dark Matter.

     
  • avatar

    Josue R. 10:34 pm on July 12, 2010 Permalink | Reply  

    Git Publish to shared server (eg: GoDaddy ssh) 

    As a web developer, there’s nothing more I hate than not having the right tools to get the job done quickly or at an optimal speed. Aside from that, many hosting servers, for example GoDaddy, makes it even frustrating to work without access to version control and sometimes without SSH access when your clients hosting plans is on a shared plan. Not able to use Git (or SVN which ever you prefer) makes it a pain in the ass to commit changes, update the site quickly and show your talents.

    So you know what I did of course, yes you do. I created an alternative tool that would alleviate the suffering of having to use FTP each time to update the website. I present to you my version of Git Publish to GoDaddy shared servers and the likes:

    The script is very simple to use, just edit your SSH settings within the file then open up that trusty terminal window and run as such:

    sh Git_Publish_To_Shared_Server.sh

    The script will archive in a file the latest git commits since you last did your Git Push. It will secure copy the archived (tar.gz) file to your SSH server, then extract the archived file and update your remote files instantly.

    The script checks if the current repository is clean or dirty, which will warn you in case its not clean. After you’ve commited your changes locally, its time to upload the most latest changed/added files to the website hosting via SSH. But don’t worry too much, the only thing the script asks you each time is your ssh password. (No, it does not store the password nor send it over to me) … just take a look and see how tiny yet useful it will be to you.

    Happy Hacking.

     
    • avatar

      Jay Swain 12:57 am on October 13, 2010 Permalink

      How did you get around the password prompt when doing the scp?

    • avatar

      Josue R. 7:27 pm on October 13, 2010 Permalink

      It doesn’t bypass the scp password prompt. I left it on the script so its safer to prompt than storing your password and piping it to scp. If you use this script on a server which you have SSH password-less access configured (aka your public ssh key on the server) then the password should not prompt you.

    • avatar

      Massage Cushion 5:43 am on November 8, 2010 Permalink

      godaddy is not always the best registrar, the private registration of godaddy is too expensive.

    • avatar

      Electric Griddle 3:41 pm on January 24, 2011 Permalink

      I am very thankful to this topic because it really gives great information

    • avatar

      Josh 4:17 pm on April 1, 2011 Permalink

      Sorry I’m a shell script noob, but is this all about wrapping up local Git changes and pushing them via scp?

      I found this great post about setting up Git on Godaddy via a prior build created on a Virtual Box! Seems to work like a charm http://johntrammell.com/wp/2011/01/05/using-git-on-godaddy/

    • avatar

      Greg 10:47 pm on September 27, 2011 Permalink

      I am two weeks into using GIT and I’m already using your script to post from my VPS to a GoDaddy account. This works well! My only question is why have you asked to Push changes to remote repo at the end of the script?

    • avatar

      Josue R. 8:24 pm on January 6, 2012 Permalink

      @Josh pushing files via “scp” because GoDaddy didn’t make it easy to go regular “git push”. (Its been a long while so i think they might have updated their hosting to allow Git – unfortunately i’m no longer with GoDaddy neither recommend them to anyone.)

  • avatar

    Josue R. 11:43 pm on August 18, 2009 Permalink | Reply
    Tags: ,   

    Ubiquity – PHP search & preview (updated) 

    As you know from my last post on Ubiquity and PHP, I love to search and use the add-on like a mad-man, but i just could not get PHP search fully implemented for all functions, so i’ve updated the darn plugin. It is version 0.4 because that’s where i feel it was last best iterated, without my trusty SVN enabled.

    Whats new?

    Well for starters, the PHP search algorithm (and its very simple indeed, just take a peak) can now search for all existing functions (atleast from what i’ve tested so far). If the function you searched was misspelled or incorrect, it fails nicely into the default “PHP Function List” search results, as PHP.net current does for your convenience.

    Second, sometimes when I search for php functions, I don’t necessarily need to view all the content of the function page, that is: code usage, examples, notes, parameters and user contributed notes. So what do I do in this case? I simply give it an parameter action after the function name to just display that section.

    Usage before:

    Start Ubiquity and type “php strstr” … notice how it just returns all the code block usage, examples, etc. Also notice how the scrollbar appears, I hate that.

    Usage now (with only examples):

    Start Ubiquity and type “php strstr examples” … notice how it just returns only examples.

    You can return everything with param action “all” or by sections “description”, “notes”, “comments”.

    Go ahead, give it a try and let me know what you think. If you’re a web developer, please feel free to extend it even more via Github.

    View the Ubiquity PHP command and install it here.

    PHP Search Tips:

    Displays function & examples: {FUNC}
    Displays only description: {FUNC} desc or {FUNC} description
    Displays only parameters: {FUNC} params or {FUNC} parameters
    Displays only notes: {FUNC} notes
    Displays only user contibuted notes: {FUNC} comments
    Displays All: {FUNC} all

     
  • avatar

    Josue R. 5:47 am on August 2, 2009 Permalink | Reply  

    Google Voice + iPrint = Free Biz cards 

    So you want free business cards, you say? And want to have you Google Voice number too, eh? Don’t hesitate any longer and grab your free business cards from Google.

    I happen to see an ad for free printed business cards on my Google Voice account, so I wanted them now. It took me to iPrint’s website and ask me to fill in a few fields  (business name, address, email, etc) and iPrint (Google’s partnered printer) gives you the real-time proof of your cards. Submit your order through the cart and expect them in 10 business days via USPS (free shipping too). Happy networking.

     
  • avatar

    Josue R. 6:19 pm on July 26, 2009 Permalink | Reply  

    Stargate Universe – trailer#2 

    I have been a loyal fan of Stargate (call me a fanboy if you’d like) since the theater showing of the original movie. Counting the years since, it has been more than 15 years and even still I’m more into the franchise then ever. My anticipation for the spin-off Stargate Universe is beyond words after having watched the second trailer of the show. I felt a wave of bliss, satisfaction and energy with all the hints, dramatic scenes and special effects the Stargate team have in stored for us dedicated fans and newcomers.

    Well, enough for now. I will write more about the show as it comes and certainly be talking about the previous series’ (Stargate SG-1 and Atlantis), because after their ending finales, there is still much to talk about, theories to contemplate and questions unanswered. Especially my questions between the alliance of four great races, their technological relationships and advances.

    Below is the Stargate Universe trailer # 2 for your viewing pleasure:

     
  • avatar

    Josue R. 2:54 am on July 15, 2009 Permalink | Reply
    Tags: firefox, ,   

    Ubiquity: Search & preview PHP string functions 

    If you love Ubiquity and constantly develop with PHP but hate referring to the online docs like i do, then this command might save you seconds on your productivity. Simply search for a basic string function and get the reference and example of the particular function. I’m hoping to expand to all documentation of PHP in the near future.

    Usage: PHP strstr

    Install via Ubiquity here.

    This command has been updated with action parameters, click here for more details.

     
    • avatar

      teratips 3:46 am on July 17, 2009 Permalink

      its looking great post, thanks and also appreciate your Idea on my blog TeraTips.com

  • avatar

    Josue R. 10:30 pm on June 30, 2009 Permalink | Reply  

    First! 

    My thoughts are everywhere. It is better defined as motionless and meta-physical in a virtual space, like the Web.

    Care to read my thoughts, then follow me via Twitter. Have a hunger for photo’s and still moments? Why not check out my gallery collection in Flickr.

    It helps knowing people who love their careers as much as I do, so I enjoy connecting with others who share the same interests in innovation, information technology and creative solutions. Their passion and dedication to improve in skill strives me to do the same. So let’s make a connection through LinkedIn, and lets shape a brighter future.

    There is more to come in the near future. You will know more about my ideas, inspirations and the people who influence me.

    See you soon, for now.

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel