The Entrepreneur Forum | Startups | Entrepreneurship | Starting a Business | Motivation | Success

OFF-TOPIC Having Fun

Remove ads while supporting the Unscripted philosophy...become an INSIDER.

404profound

Platinum Contributor
I've Read UNSCRIPTED
Speedway Pass
Aug 27, 2017
1,508
3,026
772
Desert of Desertion
I have been working on my app for five full months now, and am making good progress. Just sharing some of the things I look at to get a laugh when the going (often) gets rough. Hopefully other technically-inclined folks can relate haha.









 

Don't like ads? Remove them while supporting the forum. Subscribe.

XxThelionxX

Bronze Contributor
Read Millionaire Fastlane
I've Read UNSCRIPTED
Speedway Pass
Aug 26, 2017
185
186
156
Texas
That stuff is rough. I couldn't wrap my head around getting the exact right code. Especially with a wall of code.

Beneficial...so helpful. I know it sucks but if it's pushing you towards your goals. Nuh uh your not leaving me behind!


Sent from my iPhone using Tapatalk
 

404profound

Platinum Contributor
I've Read UNSCRIPTED
Speedway Pass
Aug 27, 2017
1,508
3,026
772
Desert of Desertion
This one is fantastic.
_______________
//Code sanitized to protect the foolish.
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Web.UI;

namespace Mobile.Web.Control
{
/// <summary>
/// Class used to work around Richard being a f*cking idiot
/// </summary>
/// <remarks>
/// The point of this is to work around his poor design so that paging will
/// work on a mobile control. The main problem is the BindCompany() method,
/// which he hoped would be able to do everything. I hope he dies.
/// </remarks>
public abstract class RichardIsAFuckingIdiotControl : MobileBaseControl, ICompanyProfileControl
{
protected abstract Pager Pager { get; }

public void BindCompany(int companyId) { }

public RichardIsAFuckingIdiotControl()
{
MakeSureNobodyAccidentallyGetsBittenByRichardsStupidity();
}

private void MakeSureNobodyAccidentallyGetsBittenByRichardsStupidity()
{
// Make sure nobody is actually using that f*cking bindcompany method
MethodInfo m = this.GetType().GetMethod("BindCompany", BindingFlags.DeclaredOnly |
BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
if (m != null)
{
throw new RichardIsAFuckingIdiotException("No!! Don't use the f*cking BindCompany method!!!");
}
// P.S. this method is a joke ... the rest of the class is f*cking serious
}

/// <summary>
/// This returns true if this control is supposed to be doing anything
/// at all for this request. Richard thought it was a good idea to load
/// the entire website during every request and have things turn themselves
/// off. He also thought bandanas and aviator sunglasses were "f*ckin'
/// gnarly, dude."
/// </summary>
protected bool IsThisTheRightPageImNotSureBecauseRichardIsDumb()
{
return Request.QueryString["Section"] == this.MenuItemKey;
}

protected override void OnLoad(EventArgs e)
{
if (IsThisTheRightPageImNotSureBecauseRichardIsDumb())
{
Page.LoadComplete += new EventHandler(Page_LoadComplete);
Pager.RowCount = GetRowCountBecauseRichardIsDumb();
}
base.OnLoad(e);
}

protected abstract int GetRowCountBecauseRichardIsDumb();
protected abstract void BindDataBecauseRichardIsDumb();

void Page_LoadComplete(object sender, EventArgs e)
{
BindDataBecauseRichardIsDumb();
}

// the rest of his reduh-ndant interface members
public abstract string MenuItemName { get; set; }
public abstract string MenuItemKey { get; set; }
public abstract bool IsCapable(CapabilityCheck checker, int companyId);
public abstract bool ShowInMenu { get; }
public virtual Control CreateHeaderControl()
{
return null;
}
}
}
 

Sponsored Offers

Introducing MJ's Personal Unscripted Network, Join Now for FREE!
If you are in IDEA mode, text "IDEA" to the above number. If you are in LAUNCH/START mode, text...
MARKETPLACE 7 Days To Freedom: From Wantrepreneur/Wage Slave To Freelancer
7 Days To Freedom: How To Go From Wantrepreneur To Income Producing Freelancer In Just 7 Days...
  • Sticky
MARKETPLACE Lex DeVille's - Advanced Freelance Udemy Courses!
I have a long weekend off work.. bought your "Start a Freelance Business: Take Back Your...
  • Sticky
MARKETPLACE Fox Web School "Legend" Group Coaching Program 2021
Adding in my 2 cents for anyone considering joining. Let me save you the deliberation - join...
MARKETPLACE Not sure how to start? This free book will teach you how to build a successful web design business
If there’s one thread I see repeated over and over again on the forum, it goes like this: “I...
  • Sticky
MARKETPLACE You Are One Call Away From Living Your Dream Life - LightHouse’s Accountability Program ⚡
Thanks for clearing that up. What do you recommend for those who are still in the process of...
  • Sticky
MARKETPLACE Kill Bigger Incubator
I have not offered one of these in a while, but it looks like I have time to take on an...



Forum Sponsor

Over 100 Fastlane Students
More Details...

New Topics

Fastlane Insiders

View the forum AD FREE.
Private, unindexed content
Detailed process/execution threads
Monthly conference calls with doers
Ideas needing execution, more!

Join Fastlane Insiders.

Top Bottom