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
FASTLANE INSIDER
I've Read UNSCRIPTED
Speedway Pass
Aug 27, 2017
1,366
2,820
667
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
FASTLANE INSIDER
Read Millionaire Fastlane
I've Read UNSCRIPTED
Aug 26, 2017
136
129
141
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
 
OP
OP
404profound

404profound

Platinum Contributor
FASTLANE INSIDER
I've Read UNSCRIPTED
Speedway Pass
Aug 27, 2017
1,366
2,820
667
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;
}
}
}
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Sponsored Offers

  • Sticky
FEATURED! Introducing... WEALTH EXPO$ED, A Short Story By MJ DeMarco
Got it several weeks ago and have listened to it several times now. I've definitely met both...
  • Sticky
MARKETPLACE Fox' Web School's "Legend" Group Coaching Program 2020
For those with the "can web design be Fastlane" question this video by @MJ DeMarco is a great...
  • Sticky
MARKETPLACE You Are One Call Away From Living Your Dream Life - LightHouse’s Accountability Program ⚡
Just got off the phone with @LightHouse. Having just a 45 minute conversation with him has...
  • Sticky
MARKETPLACE Kill Bigger Incubator
@Kak Out of curiosity, what types of businesses are you advising on? (I read this whole thread...
  • Sticky
MARKETPLACE Lex DeVille's - Advanced Freelance Udemy Courses!
Just bought 5 of your Upwork courses. Thanks for making valuable content Lex!
  • Sticky
MARKETPLACE Grow Your Business With a Book (An Unorthodox Marketing Strategy That Built One of the Largest...
Thanks for your offer to look at my book. Here's the link to the squeeze page Buy The Prosperous...



Forum Sponsor

sponsor

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