Simple and quick Ruby on Rails double click protection

RoR to me is one of the best web frameworks I have used. Simply because of how fun ruby code is and all the mundane things RoR handles. I have used django, I code at my day job using c#/asp.net/mvc. When I hear the odd person complain how shitty RoR is, I know for fact they haven’t developed anything using the framework; if they did, they wouldn’t be complaining.

Cool tidbit to stop double clicks on buttons. I saw lots of examples hacking up javascript code for this and using server side checking (is the safest) on the time difference between clicks.
I just wanted something quick so I found out this rad simple trick.

<%= f.submit "Create", :disable_with => 'Saving...' %>

Use :disable_with as parameter on the submit helper, and BAM! No more double clicks. I am sure there is caveats to this, I haven’t looked into the wiring yet.

Simple, love it, Outta Here!


www.theshizit.com

Word uppp shizinators! I have been on a roller-coaster ride with the current company I work for. It was under a friendly takeover, everyone’s jobs were a big “?”. Until … another company put a bid on it and won the deal. The company that purchased it will keep it running with better budget and keep all the employees, Ya still have a job!

During the waiting period there were no new projects, so when I wasn’t fixing bugs, I was taking advantage of some free time and whipped up a weekend type project called “theshizit”, check it out! www.theshizit.com.

It was inspired by message boards I used past and present like the infamous 4chan, reddit, facebook wall, stack overflow and other forum software. I wanted to create something a little more fun and a little different (but kind of the same). I wanted and implemented these features:

  • Anonymity: No user information or dates are posted.
  • No Static Categories: I wanted users to create the content and drive the board in direction I don’t determine
  • Post Types: have different types of post, currently there is: blog, link, rant, code and question
  • Keep the board fresh: the content each month is archived available still for view, and a new clean board is available to shiz on!
  • Categories are in the cloud: Make categories stand out by giving them pow points, the users decide what is good

Its up, it is running so … sign up, browse, and take it for a test run. It is in the early stages, but still highly usable.

I will be opening up the source code when I am closer to version 1.0. Then you can run your own shiz board! The more shiz in the world the better! Now that is the SH!Z!T!!!!!
Shiz, shiz it, that is the shiz, shiz bang!, shizz’in, I am the shiz outta here!


Gather – Yes! Another F’in Survey Application! Part 1

Ok, ummmmm ….. Yeah I know there is a billion online survey options, corporate survey solutions, survey developer packages, and even open source survey software. Why would I choose to develop another survey application to pollute the survey realm, especially as my first open source project?

When you ask someone which survey platform or service they use, You will get a completely different answer for each person asked! Also, none of the answers include an open source platform.

What is the top used survey service? I can’t really answer this. Weird. This is either going to be good exercise to learn what not to do, and/or this is such a difficult problem that there is no ultimate solution. Either way I feel this is going to be a huge level up in my knowledge faction.

Besides all the zen I will gain, I enjoy collecting data and helping make some sense of the heap of information that has been collected. I have been doing this for most of my development career. Not specifically with survey data, but with many types of data collections: financial, performance, purely informational, behavioral … the types of data collected is endless.

Now, why are there so many survey software options?
1. Every company or person needs to collect feedback, do some kind of research, and get general input. Best and easiest way is to have a questionnaire or survey. Obviously, there is a huge need for this type of application and a lot users to go around support all the survey applications out there.
2. Point one lead me to this assumption, that maybe it is one of the easiest opportunities to make money in software. Get your application the highest rank on google or on the first page and you’re guaranteed to get some subscribers. Regardless if your survey software is good or not.

What is going to be different or better in this software? Nothing, I am going to replicate every useful feature that is available today. Ok, there will be some differences, but nothing to do with functionality: no crazy marketing and no fees. Oh, and it will be open source. Surprisingly there is not that many choices in the open source world, and if there is, I found they are not very active.

I originally made this software with ASP.net MVC for a project, I have been working hard converting all the features to Ruby on Rails, and I am grateful I made this decision. This helped me reduce the price of using the software to free. Also, Ruby and me seem to work really well together!

Gather Check out the demo, create a survey, tell me what you hate or need, find a bug … anything helps. I am doing test type releases, currently version 0.2, I hope to get to the next milestone v0.3 soon. Once I get to version 0.9 it will go beta, then of course full stable release when it eventually gets to 1.0. You can track the progress on GitHub.


theShizit

The Shizit! What does that mean!?! It means the “real deal”! We used to say it when I was a young lad, when all I cared about was a good party, playing loud music, and skating (as in skateboarding). I had a passion for computers since very young but didn’t get an opportunity to indulge in it until my very late teens .. early 20s. But I can say for the last 15 years it has consumed my life and thoughts, it has become my main passion. I still love playing music, a good party, and occasionally skating though.

Fritz, so what? Get on with it!

Just wait! When I started out, I worked for a big financial institution, really excelled, got promotions, developed what I thought at the time were really important applications, kept things running, hammered out more applications, kept getting bonuses, everything felt rad! I got really stoked over the fact that I could further my education and the company would support and pay for it. So after work I would go to my computer science classes until 10pm every other night, tried super hard, got awarded academic achievement in computer science. In the meantime, I got married, bought a house, had kids. Continuing university became impossible unless I wanted to be a dead-beat dad.

And my career got boring… really, really boring. It wasn’t challenging anymore, but when I looked at other jobs it all seemed a big pile of the same. It got so boring I didn’t care where I worked, so I quit and found a similar job. Closer to home, less commute. It gave me more time to spend with the family and do other things that were important to me.

The years have blown by – so many cool things had happened, so much learned, so many challenges. But when at college (programmer/analyst concentration), before working as a developer or going to university, I didn’t want to do typical business development. I wanted to work on games, online apps, I loved the information accessibility of the internet – cool fun things! I’ve done some cool things in the business/enterprise realm, but the cause isn’t for me. I’m developing and making good money, but it’s time to take it to the next level.

If you can’t become part of a company that inspires you, maybe it’s time to start something inspiring. Right? So that’s my quest.

Well, and I’ve been applying to inspiring companies. I applied @ bandcamp, solved their puzzles, got the email address to apply, had a few email conversations with the co-founder, who seems like a really cool guy. Unfortunately, my skill set and experience is not aligned with what they needed. Latest was Digitally Imported, once again solved the puzzle to get the email address to apply. Applied and have heard nothing. No big deal – these no-gos are giving me more motivation to keep improving.

I’m looking at my current skills… What I know best is mostly Microsoft based technologies. It’s what big and small enterprises love to use. All my applications have been internal/intranet applications. Business units don’t really care what’s in a program as long as it does an alright job and doesn’t crash. Then it will be changed to something else in 2 years, when Microsoft releases a new version of their tool sets.

So changes, right…… what I am going to do? Well,

  • keep on applying to companies that inspire me
  • work on my blog and website to showcase ME
  • become a RAD Rubyist! Not because it’s trendy, but because it’s a creative and inspiring language. This lends itself to creative and inspiring projects.
  • hammer out some side projects! I’m actively working on
    1. an Open Source survey software called “Gather” and
    2. tools for bands, code-named ‘Guitaritis’ with 3 other developers. Both projects use RoR and other open source technologies.

I’ll try to blog about these projects regularly, post some tutorials on the technologies I’m using, and anything else to help out the peeps.

I’ll minimize these kind of whining blog posts, but I had to vent it out.

Check back often, Yeaaaah Budddy!


Sharepoint 2010 issue: MVC 2 App under Sharepoint website root, Day 4

See day 3

Wow, days in Microsoft world are very long compared to normal 24 hour days. Here it is! The post me, you, and everyone who gives a sh!t has been waiting for. The post that will end the post of getting MVC 2 to run under sharepoint 2010.

The solution will start with this quote from Microsoft development support:

SharePoint does not support ASP.NET 4.0 running on SharePoint Server. This is regardless of SharePoint version including V3 and V4, due to “various and unexpected” problems that may occur.

Let me add to this, I also tried mvc 2 targeting .Net 3.5, this also does not work. I would also go far as saying don’t deploy any applications under sharepoint 2010, I foresee issues that can be easily preventable with a little more money and time. The recommendation from Microsoft Support is to use a single-sign on solution(AD federation services). Separating the web applications from sharepoint.The good thing is we have this in development and it was going to be a future deploy. I guess that deploy needs to be a present deploy instead of the future deploy. Deploy, deploy ……deployyyyyyyy.

Thats it. Maybe some you hackers know a solution, if so post yOOO!


Sharepoint 2010 issue: MVC 2 App under Sharepoint website root, Day 3

Day 2 read it here

Hello, Hallo, Hello, … How Low …
That was a long day from Day 2 to Day 3. I am blaming Microsoft entirely for the delay in posts (it is all your fault Bill!). Well, Amy calls me (Microsoft Sharepoint support) she was having difficulty replicating the error. We worked together in technological synergy and harnessed the power of the error. She now is getting the exact same error as I am. Solution …… solution to this seemingly trivial error! No solution as of yet. She now has to work with the ASP.NET team. Good thing I have a million other things to develop, solve, and fix; because I would just be sitting obsessing over this error, festering and brewing into some kind of personality complex ….

ant

Soon, hopefully I will have the post that puts this to an end!


Sharepoint 2010 issue: MVC 2 App under Sharepoint website root, Day 2

continued from Day 1 Read it here.
Beep beep be beep beep. That is me phoning Microsoft support. Yes! I really love phoning support and traversing the layers of Microsoft support employees, trickling its way down eventually to the developers that make this glorious software that not many people understand for some reason.

I get this dude Micheal, we open an incident together.

He tells me he needs a credit card to pay for this incident,
“WHATTTTTT! I am an MSDN subscriber”, I exclaim.
“Sorry your majesty”, “Just one second”
He reads off my incident number in the most bored, I hate my f!#ken job, this number is way too f$%ken long tone. Hey, I don’t blame him. Thanks dude.

So the incident is open. I have to wait 8 business hours to get a return call from first line of support, Most likely from India. I go for lunch, come back and there is a message. Yeah of course, it is from Microsoft India. There is little bit of language barrier can’t understand the email address, B as in Charles …. C or B have no idea. Luckily I can understand the phone number. So I phone this dude, Very nice guy, seems really bored as well. We have a live meeting date, we hold hands and I explain my problems.

I cannot continue Fritz, I can’t go on any further with this lie! I am not a developer …
It is ok dude, it wouldn’t work anyway. To much distance between us.

So he forwards my email to sharepoint development support … A nice girl named Amy. I send Amy the details on what I am trying to do. She has no idea of what MVC is … boo ha. I think Microsoft must put each employee in a bubble and not let them do anything outside of the bubble. You have been bubbled into the sharepoint development support, you will do nothing else but SHARRRRREPOINT Development support HAHAH HAHHAHAHHAH AH !

So I am waiting for the lovely Amy to replicate the same configuration as mine in her environment, I wonder if her environment is the same as earths …. maybe it is different … Maybe I should just, smash all the servers at work and burn all the back ups, and spray paint 666 all over the server room …. nah I am just going to kick it up with some tunes and let it burn until Monday ….. kyuss….. Stay tuned for Day 3!


Sharepoint 2010 issue: MVC 2 App under Sharepoint website root, Day 1

OHHHH BoyyyyyyyeeezzzzzZ!!!!!!

At my day job, we are moving from sharepoint 2003 to 2010. Yes! 2003 sharepoint, the document management stuff is great, the rest is a huge swollen thumbs down for me, inserted into sharepoints _________.

So let me describe our current environment a bit, sharepoint 2003 has taken over IIS 6.0. AHHHHHH, so we deploy child applications under sharepoint root website. In sharepoint 2003, we can tell it to exclude these apps from sharepoint handling and they work great. We have ASP.NET forms apps to MVC 2 (this took a small trick, if any body wants to know how to run MVC child apps under sharepoint 2003, I can do a quick blog about. Let me Know!) apps in all .Net glory from 2.0 to 4.0. All working as one cog for financial gain and efficiency.

Now lets do the same f’ing thing in sharepoint 2010 …. First on my list, lets deploy an MVC 2 Asp.net 4.0 app. This will be our preferred project for all future web apps. We know it works under sharepoint 2003 website root, there is one running with joy in our current production. I start with a test:

The application “Test” is the default MVC2 application created by visual studio 2010. This is to keep things simple, no other factors… basic shit. The target Framework is .Net 4.0 and using 4.0 application pool on iis 7.5.

If I browse to the application I get this error:

Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x800700b7
Config Error There is a duplicate ‘system.web.extensions/scripting/scriptResourceHandler’ section defined
Config File \\?\C:\inetpub\wwwroot\wss\VirtualDirectories\80\web.config
Requested URL http://fseitz-pc:80/Test/
Physical Path
Logon Method Not yet determined
Logon User Not yet determined

I comply and remove the duplicate references in the MVC application, which leads to an error telling me, it can`t find the references I just removed. Hammer Smashed Face

Steps to recreate problem:
1. Sharepoint 2010 running
2. Deploy the default application MVC2 project .Net 4 created by Visual Studio 2010. Do xcopy deploy under IIS root site. Make it into an application under IIS 7.5 sharepoint 2010 site.
3. Browse to the MVC2 app, see error

I duckduckgo this, I find nothing on how to get this to work on sharepoint 2010. So I google it, nothing either. I found some examples … on issues when the .net framework is a lower version and running 4.0 as a child app. Something to do with application hierarchy that is implemented in IIS 7.5. Tried the configurations, but with no luck under sharepoint 2010.

First test … stopped dead in my tracks. Why!? oh why!?? …it works in sharepoint 2003 with IIS 6.0 ….whyyyy!!!?!? The bright side of all this: you get to experience this with me. A new blog series of getting MVC 2 running in unison with sharepoint 2010. Time to phone Microsoft support, wasting to much time trying to solve this on my own. I will let you know how it goes in day 2 of this blog posting.

If anybody knows how to get this running without creating another website. Please post in the comments!


DuckDuckGo …… Goose?

meka leka ho!

Howdy geeks! I include myself as geek. Being a geek by permission, allows me to call other people geeks. Hmmm, would geek be a base class or a derived class? Well… I guess you could start with Person as the base class and derive a Geek class from Person ….. yeah yeah.

Just F’ing rambling again.
I came across this really fun search engine called “DuckDuckGo“. Have you tried it yet?

This is my opinion from using it over a couple days. I can say this search engine is pretty damn good! Yeee haaaawwww, Screw your _____________. I wouldn’t say better than google. However, it is a little more fun to use than google. I don’t know what it is about duckduckgo? But it is really fun to use, so fun, yeah fun…fun. Also it is lighting fast!
Check this out:

How cool is that? All the Simpson characters in alphabetical order. The search engine claims more privacy than google; we all know google keeps tabs on all of us when using their products. DuckDuckgo is anonymous when it tracks, also secure with https option, less ads (for now) and other cool features. Check it out

Next time you go to google your next search do something a little different and “duck it!” I think it is great compared to other google alternatives. It also has a very straight forward simple xml based api no api keys or accounts.

Check it out and leave comments on any other goodies found while ducking it.


Sharepoint 2010 Visual Webparts and WCF

Hardy har har har,

There is a really nice feature with Sharepoint 2010 that allows you to create webparts in a very intuitive way with Visual studio 2010. You can create a project called Visual Web Part:

Now this project is pretty much a ASP.NET user control with some extra classes and meta data to work with Sharepoint. What can you put into visual webparts? Well the answer is great, anything you can put in a ASP.NET user control, plus the added advantage of using sharepoint assemblies. Believe me coming from sharepoint 2003 this is the Sh@T! At my day job we are currently working on upgrade from 2003 to 2010.

Now we have the POWWWWWERRRRR! How can we use web services with visual webparts? This is what I did.
Right click on your project and click “Add Service reference”:

After you add it you will now have “Service References” folder and you should see you service reference in this folder. Now you can reference the service in your code and use all its Objects and methods. Wow Fritz, This is how it is suppose to work!?

The unexpected part is when we go to run and debug the project or deploy the project, The service reference will not work. You will get errors! Why are you getting errors. Because the app.config file that it creates in your project which contains the service reference info, is not deployed with the project. If you open app.config you will see something similar to this:

<system.serviceModel>
        <bindings>
            <wsHttpBinding>
                <binding name="WSHttpBinding_IPosReporting" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                    allowCookies="false">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="false" />
                    <security mode="Message">
                        <transport clientCredentialType="Windows" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="Windows" negotiateServiceCredential="true"
                            algorithmSuite="Default" />
                    </security>
                </binding>
            </wsHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://misoffsvrweb1dv/POSReporting/PosReportingService.svc"
                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IPosReporting"
                contract="POSReporting.IPosReporting" name="WSHttpBinding_IPosReporting">
                <identity>
                    <dns value="localhost" />
                </identity>
            </endpoint>
        </client>
    </system.serviceModel>

So how do you get this information to be used by sharepoint. What I did is copied and paste this info into the sharepoint sites web.config.

Open the sharepoints web.config file then look for the closing xml tag:

</system.webserver>

right after that paste everything from app.config starting and ending on the system.ServiceModel tag:
<system.serviceModel>everything in this tag</system.serviceModel>

Save the web.config file, make sure you have admin rights to do this. Run you visual web part project and it should deploy and run!!!

Thats it, thats it ……


Follow

Get every new post delivered to your Inbox.