Jump to content

"I'm not sure you've really got this whole Object-Oriented thing..."


hooovahh

Recommended Posts

It's text based, but I found it funny.

s = 7

"We're allowed to have multi-character variable names now, you know."

slots = 7

"Okayyy... Isn't that 7 sort of hard-coded?"

SEVEN = 7

...

slots = SEVEN

"Very funny."

SLOTS_PER_WIDGET = 7

...

slots = SLOTS_PER_WIDGET

"Getting there."

import widgetConstants

...

slots = widgetConstants.SLOTS_PER_WIDGET

"Okay, that's..."

widgetModelFactory = WidgetModelFactory.getInstance()

widgetModel = widgetModelFactory.getWidgetModel()

slots = widgetModel.getSlotsPerWidget()

"Sure, okay, that's..."

context = Context.getCurrentContext()

serviceDirectoryFactory = ServiceDirectoryFactory.getServiceDirectory(context)

serviceDirectory = serviceDirectoryFactory.getServiceDirectory(context)

serviceDescriptor = ServiceDescriptorFactory.getDescriptor("widgetModelFactory")

widgetModelFactoryServiceLocator = serviceDirectory.getServiceLocator(serviceDescriptor,context)

widgetModelFactory = (WidgetModelFactory)widgetModelFactoryServiceLocator.findService(context)

widgetModel = widgetModelFactory.getWidgetModel(context)

slots = widgetModel.getSlotsPerWidget()

"I'm not sure you've really got this whole Object-Oriented thing down quite right..."

slots = thisWidget.getSlotCount()

"Thank you."

Source

  • Like 2
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.